mozjs icon indicating copy to clipboard operation
mozjs copied to clipboard

Notes on ESR 128

Open sagudev opened this issue 10 months ago • 12 comments

Just some things that I have to be careful about (because I will probably forget them by the summer when ESR lands):

  • https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/D194086.patch can be dropped due to https://bugzilla.mozilla.org/show_bug.cgi?id=1853564
  • https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0029-fix-ld64-detection.patch is still in progress: https://bugzilla.mozilla.org/show_bug.cgi?id=1844694
  • https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0010-update-mozboot-to-ndk-r25.patch can be dropped due to https://bugzilla.mozilla.org/show_bug.cgi?id=1822171
  • ~~investigate https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0027-No-ErrorStackFrames-in-clones.patch: https://github.com/servo/servo/issues/32648~~ DONE
  • Remove streams: https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0026-js-streams.patch, WIP: https://github.com/servo/servo/issues/29088
  • New MozillaBuild "needs" to be packed into new moztools (not sure if we really need it, but it's nice to have)

sagudev avatar Apr 20 '24 15:04 sagudev

https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0010-update-mozboot-to-ndk-r25.patch can be obselete I think. Upstream has newer version of ndk already.

wusyong avatar Jul 03 '24 04:07 wusyong

https://github.com/servo/mozjs/blob/main/mozjs-sys/etc/patches/0010-update-mozboot-to-ndk-r25.patch can be obselete I think. Upstream has newer version of ndk already.

You are right!

sagudev avatar Jul 03 '24 04:07 sagudev

This will be problematic: https://bugzilla.mozilla.org/show_bug.cgi?id=1824671 as it requires usage of cbindgen ...

EDIT: There is USE_RUST_UNICODE_BIDI, so we can replace this eventually (in this ESR cycle).

sagudev avatar Jul 09 '24 17:07 sagudev

Moving from 0 based column number to 1 based column number: https://bugzilla.mozilla.org/show_bug.cgi?id=1862692

sagudev avatar Jul 10 '24 05:07 sagudev

Also fixes in glue for https://bugzilla.mozilla.org/show_bug.cgi?id=1620223, https://bugzilla.mozilla.org/show_bug.cgi?id=1576076

sagudev avatar Jul 10 '24 11:07 sagudev

Changes to offthread compilation are big (it was removed): https://bugzilla.mozilla.org/show_bug.cgi?id=1845638 https://bugzilla.mozilla.org/show_bug.cgi?id=1846392 https://bugzilla.mozilla.org/show_bug.cgi?id=1846194 https://bugzilla.mozilla.org/show_bug.cgi?id=1809861

now it's done using JS::FrontendContext APIs and tasks controller: https://hg.mozilla.org/mozilla-central/rev/29a877cbf7a9

sagudev avatar Jul 10 '24 11:07 sagudev

This will be problematic: https://bugzilla.mozilla.org/show_bug.cgi?id=1824671 as it requires usage of cbindgen ...

EDIT: There is USE_RUST_UNICODE_BIDI, so we can replace this eventually (in this ESR cycle).

Or maybe not I got linker errors ...

sagudev avatar Jul 10 '24 12:07 sagudev

So, the problem is that we need to use our cargo.toml to build icu stuff, but mozilla is patching them in tree, and we cannot do that (every consumer would need to patch some crates as patches are only applied from root cargo.toml)

sagudev avatar Jul 10 '24 14:07 sagudev

NewExternalArrayBuffer has been changed to take a UniquePtr, so a wrapper needs to be added. https://searchfox.org/mozilla-esr128/source/js/src/vm/ArrayBufferObject.cpp#3085

Redfire75369 avatar Jul 12 '24 05:07 Redfire75369

NewExternalArrayBuffer has been changed to take a UniquePtr, so a wrapper needs to be added. https://searchfox.org/mozilla-esr128/source/js/src/vm/ArrayBufferObject.cpp#3085

Thanks for heads up, currently I only done changes to make it work for mozjs, see #474, but I expect more changes will be needed when working on servo PR (including NewExternalArrayBuffer wrapper).

sagudev avatar Jul 12 '24 05:07 sagudev

I just found that in https://discourse.mozilla.org/t/upgrading-embedding-from-115esr-to-128esr-any-big-changes/133427/2 and decided to point it out.

Redfire75369 avatar Jul 12 '24 05:07 Redfire75369

Ideally one day we would get more high level wrapper: here is it for uniffi in mozilla tree https://searchfox.org/mozilla-central/source/toolkit/components/uniffi-js/OwnedRustBuffer.cpp#88

sagudev avatar Jul 12 '24 12:07 sagudev

This is done now, for next ESR there is https://github.com/servo/mozjs/issues/476

sagudev avatar Aug 06 '24 11:08 sagudev