servo / mozjs

Servo's SpiderMonkey fork
239 stars 112 forks source link

Notes on ESR 128 #462

Closed sagudev closed 1 month ago

sagudev commented 4 months ago

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

wusyong commented 2 months ago

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.

sagudev commented 2 months ago

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 commented 1 month ago

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 commented 1 month ago

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

sagudev commented 1 month ago

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

sagudev commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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)

Redfire75369 commented 1 month ago

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

sagudev commented 1 month ago

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).

Redfire75369 commented 1 month ago

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.

sagudev commented 1 month ago

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 commented 1 month ago

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