path: root/render/html.c
diff options
authorVincent Sanders <>2015-03-06 17:09:50 +0000
committerVincent Sanders <>2015-03-06 17:16:09 +0000
commitc4e551cd0cecf4ec9aba2d033cba3ca97e669463 (patch)
tree8831b672a74dd4dd02ab3cca7770ecb89be35ece /render/html.c
parent5d3cc513a3ecadb98ed8f6e34c4521db634e09cf (diff)
clear the html content reference to javascript context.
When the browser window is about to be destroyed html_close gets called indicating the browser_window previously associated with the html content is about to become invalid. This makes the javascript context invalid within the html content (it is held by the browser window) when that context is about to be destroyed. Previously the javascript children would continue to attempt to use the context after it had been destroyed causing all sorts of strange errors and failures.
Diffstat (limited to 'render/html.c')
1 files changed, 8 insertions, 0 deletions
diff --git a/render/html.c b/render/html.c
index f3667d470..d1a61a4f3 100644
--- a/render/html.c
+++ b/render/html.c
@@ -1538,8 +1538,16 @@ static void html_close(struct content *c)
if (html->search != NULL)
+ /* clear the html content reference to the browser window */
html->bw = NULL;
+ /* clear the html content reference to the javascript context
+ * as it is about to become invalid and must not be used any
+ * more.
+ */
+ html->jscontext = NULL;
+ /* remove all object references from teh html content */