Upgrading embedding from 115ESR to 128ESR. Any big changes?

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::JobQueue implementations now have to implement isDrainingStopped().
  • Old JS_GetFunctionId replaced by two new functions: new JS_GetFunctionId that requires a JSContext, and JS_GetMaybePartialFunctionId that doesn’t. Same for JS_GetFunctionDisplayId.
  • JS::ErrorReport::filename is now JS::ConstUTF8CharsZ instead of const char*.