From 638e135c60f9a773b3a95bb9cbd0b50e105f6668 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 26 Jun 2012 18:55:57 +0000 Subject: correctly setup window object as global svn path=/trunk/netsurf/; revision=13987 --- desktop/browser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/browser.c b/desktop/browser.c index d43098003..48c04c5a9 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1399,8 +1399,8 @@ nserror browser_window_callback(hlcache_handle *c, /* only the content object created by the browser * window requires a new global compartment object */ - if (js_newcompartment(bw->jsctx, - hlcache_handle_get_content(c)) != NULL) { + assert(bw->loading_content == c); + if (js_newcompartment(bw->jsctx, bw, c) != NULL) { *(event->data.jscontext) = bw->jsctx; } break; -- cgit v1.2.3