diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-07-31 14:48:53 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-07-31 14:48:53 +0100 |
commit | c0aaf31f5a9a65808d8b7af92434608135ccc752 (patch) | |
tree | dda89f46d302b32c116c8196d35da7f88dc6ce33 /javascript/jsapi/window.c | |
parent | d763e57d30dc8c68309c5b35f556531cb8346da5 (diff) | |
download | netsurf-c0aaf31f5a9a65808d8b7af92434608135ccc752.tar.gz netsurf-c0aaf31f5a9a65808d8b7af92434608135ccc752.tar.bz2 |
fix global handling
Diffstat (limited to 'javascript/jsapi/window.c')
-rw-r--r-- | javascript/jsapi/window.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/javascript/jsapi/window.c b/javascript/jsapi/window.c index 06e6cdfe8..0b7673be3 100644 --- a/javascript/jsapi/window.c +++ b/javascript/jsapi/window.c @@ -299,8 +299,18 @@ JSObject * jsapi_new_window(JSContext *cx, JSObject *parent, void *win_priv) return NULL; } + /** @todo reconsider global object handling. future + * editions of spidermonkey appear to be removing the + * idea of a global so we probably need to handle + * global object references internally + */ + + /* set the contexts global */ + JS_SetGlobalObject(cx, window); + /* Populate the global object with the standard globals, like - Object and Array. */ + * Object and Array. + */ if (!JS_InitStandardClasses(cx, window)) { return NULL; } |