diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2013-06-03 11:55:37 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2013-06-03 11:55:37 +0100 |
commit | 8d57bb30af6e5f72664c1176155c55ed7198f60e (patch) | |
tree | 91d39908ed8d2549075e852f8730355f4e43ef72 /javascript/jsapi | |
parent | 6397fedb2b221aab93d697ed9fc0530dd1415233 (diff) | |
download | netsurf-8d57bb30af6e5f72664c1176155c55ed7198f60e.tar.gz netsurf-8d57bb30af6e5f72664c1176155c55ed7198f60e.tar.bz2 |
forcing a GC when the new global is created improves memory usage with scripts enabled
Diffstat (limited to 'javascript/jsapi')
-rw-r--r-- | javascript/jsapi/window.bnd | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd index d06e7d478..5de0e5bf0 100644 --- a/javascript/jsapi/window.bnd +++ b/javascript/jsapi/window.bnd @@ -252,6 +252,9 @@ api init %{ /* add properties to prototype */ if (!JS_DefineProperties(cx, prototype, jsclass_properties)) return NULL; + + /* as the global just got changed, force a GC run */ + JS_GC(cx); %} api new %{ |