Am Samstag, den 30.06.2012, 14:10 +0200 schrieb Vincent Sanders <[email protected]>:

I suspect that previous editions may need the user to explicitly mark
the global as ready for destruction before it is replaced. This should
be put in as JS_VERSION conditional code within jsapi.h which
implements JS_NewCompartmentAndGlobalObject()

I have created a GIT branch and added a few lines for GC the old global object.
I would be happy if there is some other person who can review this.
The old docs say, that the global object is rooted. So I though calling JS_RemoveRoot is the right thing to do. I did not call GC explicitly and setting the global object to NULL
afterward is mandatory.

Here is the branch patch:
http://git.netsurf-browser.org/?p=netsurf.git;a=blobdiff;f=javascript/jsapi.h;h=25175aa28b2099913d94b05134a5acaf66850329;hp=ac5ada79cece3cf05c2223df6fdb86fed667d747;hb=7d9a5844f9005bceca9337b592d80e30efde8157;hpb=e205f0f99e0cb6ffa0044c6c1322f5da8f795183;ds=sidebyside

Sorry, I don't know how to diff agains master, yet. Sorry, the next time I will submit such thing as an diff file.

Greets,
Ole

Reply via email to