I haven’t gotten around to writing any documentation yet or even annotating the commits but here’s a draft port of our codebase from 115 to 128: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/936
No big breaking changes. The only one was that JS::WeakCache was made private due to it not being used elsewhere in Firefox, but it’s kindly being reinstated: https://bugzilla.mozilla.org/show_bug.cgi?id=1907070
You’ll need to grab this patch stack to fix a build bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1906736
Small changes that I encountered:
- Column numbers of source locations are represented with a tagged type instead of
uint32_t, and column numbers now count from 1 like line numbers do. - Creating an ArrayBuffer with an embedder-supplied buffer now takes a UniquePtr so you’ll probably have to refactor a bit.
-
JS::JobQueueimplementations now have to implementisDrainingStopped(). - Old
JS_GetFunctionIdreplaced by two new functions: newJS_GetFunctionIdthat requires a JSContext, andJS_GetMaybePartialFunctionIdthat doesn’t. Same forJS_GetFunctionDisplayId. -
JS::ErrorReport::filenameis nowJS::ConstUTF8CharsZinstead ofconst char*.