aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2024-07-29 09:20:15 +0200
committerGitHub <noreply@github.com>2024-07-29 07:20:15 +0000
commitd132a0273d17a140a916bb4c73cdb1d81fee1d2d (patch)
treeff8e2dd72e0d91d6891e7e4a4147d8f111091d08 /components/script/script_runtime.rs
parented8def28960fd64fa0d00bd67731d594c1042747 (diff)
downloadservo-d132a0273d17a140a916bb4c73cdb1d81fee1d2d.tar.gz
servo-d132a0273d17a140a916bb4c73cdb1d81fee1d2d.zip
Update mozjs (SpiderMonkey) to 128.0 (#32769)
* Update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix changed readTransfer callback https://bugzilla.mozilla.org/show_bug.cgi?id=1842713 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Use NewExternalArrayBuffer from glue https://github.com/servo/mozjs/pull/474/commits/d33454be74ec5b8d8faf51fab3ed477b8913898b Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix columnorigin and filename being in latin1 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * fixup newexternalarray Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Float16 (this might require more work for codegen support) https://bugzilla.mozilla.org/show_bug.cgi?id=1833647 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * js.strict is removed https://bugzilla.mozilla.org/show_bug.cgi?id=1621603 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * asm options are now somewhere else https://hg.mozilla.org/mozilla-central/rev/26045c88e3972957087d535e7f259e08857bd2a2 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Comment out offthread compilation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Set NDK to 26 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fix 1-origin handling Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Expect `FinalizationRegistry` interface Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Good expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * more expectations Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Add `WeakRef` to interfaces expectation Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * mozjs upgrade: fixes for Android Android NDK's layout has changed in r26 and 'lib64' no longer exists under `toolchain/llvm/prebuilt/linux-x86_64`. The libraries that used to be it are now present in `lib` folder itself. This patch updates the build configuration to use the `lib` folder instead when configuring the LIBCLANG_PATH environment variable. This patch also updates to a newer mozjs version that includes fixes for linker errors faced on Android (see #32769). Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Patch libz-sys & update mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * update NDK version in README Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Use servo/mozjs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Update mozjs again Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs31
1 files changed, 17 insertions, 14 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index c56dbce357c..ffee9522467 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -25,17 +25,18 @@ use js::glue::{
StreamConsumerNoteResponseURLs, StreamConsumerStreamEnd, StreamConsumerStreamError,
};
use js::jsapi::{
- BuildIdCharVector, ContextOptionsRef, DisableIncrementalGC, Dispatchable as JSRunnable,
- Dispatchable_MaybeShuttingDown, GCDescription, GCOptions, GCProgress, GCReason,
- GetPromiseUserInputEventHandlingState, HandleObject, Heap, InitConsumeStreamCallback,
- InitDispatchToEventLoop, JSContext as RawJSContext, JSGCParamKey, JSGCStatus,
- JSJitCompilerOption, JSObject, JSSecurityCallbacks, JSTracer, JS_AddExtraGCRootsTracer,
- JS_InitDestroyPrincipalsCallback, JS_InitReadPrincipalsCallback, JS_RequestInterruptCallback,
- JS_SetGCCallback, JS_SetGCParameter, JS_SetGlobalJitCompilerOption,
- JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled, JS_SetSecurityCallbacks,
- JobQueue, MimeType, PromiseRejectionHandlingState, PromiseUserInputEventHandlingState,
- SetDOMCallbacks, SetGCSliceCallback, SetJobQueue, SetPreserveWrapperCallbacks,
- SetProcessBuildIdOp, SetPromiseRejectionTrackerCallback, StreamConsumer as JSStreamConsumer,
+ AsmJSOption, BuildIdCharVector, ContextOptionsRef, DisableIncrementalGC,
+ Dispatchable as JSRunnable, Dispatchable_MaybeShuttingDown, GCDescription, GCOptions,
+ GCProgress, GCReason, GetPromiseUserInputEventHandlingState, HandleObject, Heap,
+ InitConsumeStreamCallback, InitDispatchToEventLoop, JSContext as RawJSContext, JSGCParamKey,
+ JSGCStatus, JSJitCompilerOption, JSObject, JSSecurityCallbacks, JSTracer,
+ JS_AddExtraGCRootsTracer, JS_InitDestroyPrincipalsCallback, JS_InitReadPrincipalsCallback,
+ JS_RequestInterruptCallback, JS_SetGCCallback, JS_SetGCParameter,
+ JS_SetGlobalJitCompilerOption, JS_SetOffthreadIonCompilationEnabled,
+ JS_SetParallelParsingEnabled, JS_SetSecurityCallbacks, JobQueue, MimeType,
+ PromiseRejectionHandlingState, PromiseUserInputEventHandlingState, SetDOMCallbacks,
+ SetGCSliceCallback, SetJobQueue, SetPreserveWrapperCallbacks, SetProcessBuildIdOp,
+ SetPromiseRejectionTrackerCallback, StreamConsumer as JSStreamConsumer,
};
use js::jsval::UndefinedValue;
use js::panic::wrap_panic;
@@ -546,7 +547,11 @@ unsafe fn new_rt_and_cx_with_parent(
JSJitCompilerOption::JSJITCOMPILER_ION_ENABLE,
pref!(js.ion.enabled) as u32,
);
- cx_opts.set_asmJS_(pref!(js.asmjs.enabled));
+ cx_opts.compileOptions_.asmJSOption_ = if pref!(js.asmjs.enabled) {
+ AsmJSOption::Enabled
+ } else {
+ AsmJSOption::DisabledByAsmJSPref
+ };
let wasm_enabled = pref!(js.wasm.enabled);
cx_opts.set_wasm_(wasm_enabled);
if wasm_enabled {
@@ -557,8 +562,6 @@ unsafe fn new_rt_and_cx_with_parent(
}
cx_opts.set_wasmBaseline_(pref!(js.wasm.baseline.enabled));
cx_opts.set_wasmIon_(pref!(js.wasm.ion.enabled));
- cx_opts.set_strictMode_(pref!(js.strict.enabled));
- // TODO: handle js.strict.debug.enabled
// TODO: handle js.throw_on_asmjs_validation_failure (needs new Spidermonkey)
JS_SetGlobalJitCompilerOption(
cx,