mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[document] Slightly better handling of string
This commit is contained in:
parent
98e72e99f3
commit
6487a287cf
@ -310,9 +310,6 @@ reset_document(struct document *document)
|
||||
#if defined(CONFIG_ECMASCRIPT_SMJS) || defined(CONFIG_QUICKJS) || defined(CONFIG_MUJS)
|
||||
free_ecmascript_string_list(&document->onload_snippets);
|
||||
free_uri_list(&document->ecmascript_imports);
|
||||
if (document->text.length) {
|
||||
done_string(&document->text);
|
||||
}
|
||||
mem_free_set(&document->body_onkeypress, NULL);
|
||||
/// kill_timer(&document->timeout);
|
||||
/// free_document(document->dom);
|
||||
@ -403,9 +400,7 @@ done_document(struct document *document)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LIBDOM
|
||||
if (document->text.length) {
|
||||
done_string(&document->text);
|
||||
}
|
||||
done_string(&document->text);
|
||||
free_document(document->dom);
|
||||
|
||||
if (document->element_map) {
|
||||
|
@ -268,6 +268,10 @@ render_source_document_cxx(struct cache_entry *cached, struct document *document
|
||||
if (!buffer->length) {
|
||||
if (document->text.length) {
|
||||
done_string(&document->text);
|
||||
|
||||
if (!init_string(&document->text)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mapa = document->element_map;
|
||||
|
||||
|
@ -319,6 +319,9 @@ dump_xhtml(struct cache_entry *cached, struct document *document, int parse)
|
||||
if (1) {
|
||||
if (document->text.length) {
|
||||
done_string(&document->text);
|
||||
if (!init_string(&document->text)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
mapa = document->element_map;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user