mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update mozjs to a version that includes SpiderMonkey ESR 115 (#30379)
* Update mozjs to sm115 * fix module stuff https://phabricator.services.mozilla.com/D163949 * fix always allow cloning https://bugzilla.mozilla.org/show_bug.cgi?id=1774866 * Update expectations toStringTag now works on wasm object due to SM bump
This commit is contained in:
parent
c2502120cf
commit
c9b1f35a36
5 changed files with 35 additions and 93 deletions
29
Cargo.lock
generated
29
Cargo.lock
generated
|
@ -397,6 +397,27 @@ dependencies = [
|
|||
"which",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.68.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078"
|
||||
dependencies = [
|
||||
"bitflags 2.4.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"peeking_take_while",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
"syn 2.0.32",
|
||||
"which",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bit-set"
|
||||
version = "0.5.3"
|
||||
|
@ -3680,9 +3701,9 @@ checksum = "903970ae2f248d7275214cf8f387f8ba0c4ea7e3d87a320e85493db60ce28616"
|
|||
[[package]]
|
||||
name = "mozjs"
|
||||
version = "0.14.1"
|
||||
source = "git+https://github.com/servo/mozjs#d7f6f30cb9bfd3e7e4d1ff7d605059369acdf25d"
|
||||
source = "git+https://github.com/servo/mozjs#72bd691611dc857dba93fa0df41c4f26088411e7"
|
||||
dependencies = [
|
||||
"bindgen 0.66.1",
|
||||
"bindgen 0.68.1",
|
||||
"cc",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
|
@ -3694,9 +3715,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "mozjs_sys"
|
||||
version = "0.68.2"
|
||||
source = "git+https://github.com/servo/mozjs#d7f6f30cb9bfd3e7e4d1ff7d605059369acdf25d"
|
||||
source = "git+https://github.com/servo/mozjs#72bd691611dc857dba93fa0df41c4f26088411e7"
|
||||
dependencies = [
|
||||
"bindgen 0.66.1",
|
||||
"bindgen 0.68.1",
|
||||
"cc",
|
||||
"encoding_c",
|
||||
"encoding_c_mem",
|
||||
|
|
|
@ -304,7 +304,6 @@ pub fn write(
|
|||
let policy = CloneDataPolicy {
|
||||
allowIntraClusterClonableSharedObjects_: false,
|
||||
allowSharedMemoryObjects_: false,
|
||||
allowErrorStackFrames_: false,
|
||||
};
|
||||
let result = JS_WriteStructuredClone(
|
||||
*cx,
|
||||
|
@ -381,7 +380,6 @@ pub fn read(
|
|||
&CloneDataPolicy {
|
||||
allowIntraClusterClonableSharedObjects_: false,
|
||||
allowSharedMemoryObjects_: false,
|
||||
allowErrorStackFrames_: false,
|
||||
},
|
||||
&STRUCTURED_CLONE_CALLBACKS,
|
||||
sc_holder_ptr as *mut raw::c_void,
|
||||
|
|
|
@ -19,17 +19,16 @@ use ipc_channel::ipc;
|
|||
use ipc_channel::router::ROUTER;
|
||||
use js::jsapi::{
|
||||
CompileModule1, ExceptionStackBehavior, FinishDynamicModuleImport, GetModuleRequestSpecifier,
|
||||
GetModuleResolveHook, GetRequestedModules, Handle as RawHandle, HandleObject,
|
||||
HandleValue as RawHandleValue, Heap, JSAutoRealm, JSContext, JSObject, JSRuntime, JSString,
|
||||
JS_ClearPendingException, JS_DefineProperty4, JS_IsExceptionPending, JS_NewStringCopyN,
|
||||
ModuleErrorBehaviour, ModuleEvaluate, ModuleLink, MutableHandleValue,
|
||||
SetModuleDynamicImportHook, SetModuleMetadataHook, SetModulePrivate, SetModuleResolveHook,
|
||||
SetScriptPrivateReferenceHooks, ThrowOnModuleEvaluationFailure, Value, JSPROP_ENUMERATE,
|
||||
GetModuleResolveHook, GetRequestedModuleSpecifier, GetRequestedModulesCount,
|
||||
Handle as RawHandle, HandleObject, HandleValue as RawHandleValue, Heap, JSAutoRealm, JSContext,
|
||||
JSObject, JSRuntime, JSString, JS_ClearPendingException, JS_DefineProperty4,
|
||||
JS_IsExceptionPending, JS_NewStringCopyN, ModuleErrorBehaviour, ModuleEvaluate, ModuleLink,
|
||||
MutableHandleValue, SetModuleDynamicImportHook, SetModuleMetadataHook, SetModulePrivate,
|
||||
SetModuleResolveHook, SetScriptPrivateReferenceHooks, ThrowOnModuleEvaluationFailure, Value,
|
||||
JSPROP_ENUMERATE,
|
||||
};
|
||||
use js::jsval::{JSVal, PrivateValue, UndefinedValue};
|
||||
use js::rust::jsapi_wrapped::{
|
||||
GetArrayLength, GetRequestedModuleSpecifier, JS_GetElement, JS_GetPendingException,
|
||||
};
|
||||
use js::rust::jsapi_wrapped::JS_GetPendingException;
|
||||
use js::rust::wrappers::JS_SetPendingException;
|
||||
use js::rust::{
|
||||
transform_str_to_source_text, CompileOptionsWrapper, Handle, HandleValue, IntoHandle,
|
||||
|
@ -568,34 +567,11 @@ impl ModuleTree {
|
|||
let mut specifier_urls = IndexSet::new();
|
||||
|
||||
unsafe {
|
||||
rooted!(in(*cx) let requested_modules = GetRequestedModules(*cx, module_object));
|
||||
|
||||
let mut length = 0;
|
||||
|
||||
if !GetArrayLength(*cx, requested_modules.handle(), &mut length) {
|
||||
let module_length_error =
|
||||
gen_type_error(&global, "Wrong length of requested modules".to_owned());
|
||||
|
||||
return Err(module_length_error);
|
||||
}
|
||||
let length = GetRequestedModulesCount(*cx, module_object);
|
||||
|
||||
for index in 0..length {
|
||||
rooted!(in(*cx) let mut element = UndefinedValue());
|
||||
|
||||
if !JS_GetElement(
|
||||
*cx,
|
||||
requested_modules.handle(),
|
||||
index,
|
||||
&mut element.handle_mut(),
|
||||
) {
|
||||
let get_element_error =
|
||||
gen_type_error(&global, "Failed to get requested module".to_owned());
|
||||
|
||||
return Err(get_element_error);
|
||||
}
|
||||
|
||||
rooted!(in(*cx) let specifier = GetRequestedModuleSpecifier(
|
||||
*cx, element.handle()
|
||||
*cx, module_object, index
|
||||
));
|
||||
|
||||
let url = ModuleTree::resolve_module_specifier(
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
[toStringTag.any.html]
|
||||
[Object.prototype.toString applied to the namespace object]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after deleting @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[@@toStringTag exists on the namespace object with the appropriate descriptor]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[toStringTag.any.worker.html]
|
||||
[Object.prototype.toString applied to the namespace object]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after deleting @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[@@toStringTag exists on the namespace object with the appropriate descriptor]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
|
||||
expected: FAIL
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
[toStringTag.any.html]
|
||||
[Object.prototype.toString applied after deleting @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[@@toStringTag exists on the namespace object with the appropriate descriptor]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied to the namespace object]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[toStringTag.any.worker.html]
|
||||
[Object.prototype.toString applied after deleting @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[@@toStringTag exists on the namespace object with the appropriate descriptor]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
|
||||
expected: FAIL
|
||||
|
||||
[Object.prototype.toString applied to the namespace object]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue