GNOME Bugzilla – Bug 646471
[Patch] Fix build with xulrunner6 (JS_CLASS_TRACE, JS_DestroyScript, JS_BufferIsCompilableUnit)
Last modified: 2011-05-04 18:51:07 UTC
upstream removed JS_CLASS_TRACE in http://hg.mozilla.org/mozilla-central/rev/a7784d11c59b and made several changes for JSScript leading to JS_DestroyScript removal in http://hg.mozilla.org/mozilla-central/rev/c919a7271ac1 This two patches allow getting a working gjs with those changes
Created attachment 184889 [details] [review] Conditionally adapt to JS_CLASS_TRACE removal
Created attachment 184890 [details] [review] Conditionally adapt to JS_DestroyScript removal
Created attachment 184891 [details] [review] Conditionally adapt to JS_CLASS_TRACE removal Silly mistake ...
Created attachment 186843 [details] [review] Conditionally adapt to JS_BufferIsCompilableUnit changes Since http://hg.mozilla.org/mozilla-central/rev/a773890b676f we have to pass an extra arg to tell if bytes are UTF-8 encoded
Review of attachment 186843 [details] [review]: Not sure how this patch worked for you... ::: modules/console.c @@ +197,3 @@ g_free(temp_buf); lineno++; +#ifdef JS_DecodeUTF8 Should be: #ifdef HAVE_JS_DECODEUTF8
Review of attachment 184890 [details] [review]: See also patch in https://bugzilla.gnome.org/show_bug.cgi?id=646369 I think this one is good though.
Created attachment 186844 [details] [review] Conditionally adapt to JS_BufferIsCompilableUnit changes I amended my commit but forgot to re format-patch...
Review of attachment 186844 [details] [review]: Ok.
Review of attachment 184891 [details] [review]: I need to better understand the implications of this one. Do we need to implement some new hook to properly do GC?
Actually, I tried to basically follow what has been done upstream in the commit which removed it. I obviously can be missing anything there, but though, I've been running gnome-shell with those patches applied to gjs since I posted them here and did not hit any problem I could notice. (No particular leak or so)
(In reply to comment #10) > Actually, I tried to basically follow what has been done upstream in the commit > which removed it. I obviously can be missing anything there, but though, I've > been running gnome-shell with those patches applied to gjs since I posted them > here and did not hit any problem I could notice. (No particular leak or so) I double checked this and your changes look right. I'll commit this series now, thanks!
Attachment 184890 [details] pushed as 82a074e - Conditionally adapt to JS_DestroyScript removal Attachment 184891 [details] pushed as 0f886dc - Conditionally adapt to JS_CLASS_TRACE removal
Thanks again for the patches, Marc!
*** Bug 647071 has been marked as a duplicate of this bug. ***