diff --git a/Cargo.lock b/Cargo.lock
index 830d77c7cd3..e677359a8e3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3825,7 +3825,7 @@ dependencies = [
[[package]]
name = "mozjs"
version = "0.14.1"
-source = "git+https://github.com/servo/rust-mozjs#b8122da4ea8a48ea21454e65f42d5b2194a2d311"
+source = "git+https://github.com/servo/rust-mozjs#fe104a26147a42f6267286cd856361a126ab733b"
dependencies = [
"cc",
"lazy_static",
@@ -3838,7 +3838,7 @@ dependencies = [
[[package]]
name = "mozjs_sys"
version = "0.68.2"
-source = "git+https://github.com/servo/mozjs?rev=c6c7b5319975a8f0465ce8c17329e74be4cb80b1#c6c7b5319975a8f0465ce8c17329e74be4cb80b1"
+source = "git+https://github.com/servo/mozjs?rev=82da136c53d7ca7b0b7fe1c5622627036ef31899#82da136c53d7ca7b0b7fe1c5622627036ef31899"
dependencies = [
"bindgen",
"cc",
diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs
index 5fb67c64335..1085a137428 100644
--- a/components/script/dom/bindings/interface.rs
+++ b/components/script/dom/bindings/interface.rs
@@ -29,7 +29,7 @@ use js::rust::wrappers::JS_FireOnNewGlobalObject;
use js::rust::wrappers::RUST_SYMBOL_TO_JSID;
use js::rust::wrappers::{JS_DefineProperty, JS_DefineProperty5};
use js::rust::wrappers::{JS_DefineProperty3, JS_DefineProperty4, JS_DefinePropertyById5};
-use js::rust::wrappers::{JS_LinkConstructorAndPrototype, JS_NewObjectWithUniqueType};
+use js::rust::wrappers::{JS_LinkConstructorAndPrototype, JS_NewObjectWithGivenProto};
use js::rust::{define_methods, define_properties, get_object_class};
use js::rust::{HandleObject, HandleValue, MutableHandleObject, RealmOptions};
use std::convert::TryFrom;
@@ -316,7 +316,7 @@ pub fn create_object(
mut rval: MutableHandleObject,
) {
unsafe {
- rval.set(JS_NewObjectWithUniqueType(*cx, class, proto));
+ rval.set(JS_NewObjectWithGivenProto(*cx, class, proto));
}
assert!(!rval.is_null());
define_guarded_methods(cx, rval.handle(), methods, global);
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 0db6ca8cba2..d27fee98fb5 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -66,7 +66,6 @@ use std::io::{Read, Seek, Write};
use std::mem::replace;
use std::path::PathBuf;
use std::process::Command;
-use std::ptr;
use std::rc::Rc;
use std::sync::{Arc, Mutex};
use style::str::{StaticStringVec, HTML_SPACE_CHARACTERS};
@@ -446,16 +445,15 @@ impl FetchResponseListener for ClassicContext {
fetch_options: self.fetch_options.clone(),
});
- let mut token = ptr::null_mut();
unsafe {
- assert!(CompileOffThread1(
+ assert!(!CompileOffThread1(
*cx,
options.ptr as *const _,
&mut transform_str_to_source_text(&context.script_text) as *mut _,
Some(off_thread_compilation_callback),
Box::into_raw(context) as *mut c_void,
- &mut token,
- ));
+ )
+ .is_null());
}
} else {
let load = ScriptOrigin::external(
diff --git a/components/script/script_module.rs b/components/script/script_module.rs
index 1535b1dd96f..dbd1431b5e4 100644
--- a/components/script/script_module.rs
+++ b/components/script/script_module.rs
@@ -45,7 +45,7 @@ use js::jsapi::Handle as RawHandle;
use js::jsapi::HandleObject;
use js::jsapi::HandleValue as RawHandleValue;
use js::jsapi::Value;
-use js::jsapi::{CompileModule1, ExceptionStackBehavior, FinishDynamicModuleImport};
+use js::jsapi::{CompileModule1, ExceptionStackBehavior, FinishDynamicModuleImport_NoTLA};
use js::jsapi::{DynamicImportStatus, SetModuleDynamicImportHook, SetScriptPrivateReferenceHooks};
use js::jsapi::{GetModuleResolveHook, JSRuntime, SetModuleResolveHook};
use js::jsapi::{GetRequestedModules, SetModuleMetadataHook};
@@ -505,7 +505,8 @@ impl ModuleTree {
let _ac = JSAutoRealm::new(*global.get_cx(), *global.reflector().get_jsobject());
unsafe {
- if !ModuleEvaluate(*global.get_cx(), module_record) {
+ rooted!(in(*global.get_cx()) let mut rval = UndefinedValue());
+ if !ModuleEvaluate(*global.get_cx(), module_record, rval.handle_mut().into()) {
warn!("fail to evaluate module");
rooted!(in(*global.get_cx()) let mut exception = UndefinedValue());
@@ -1024,7 +1025,7 @@ impl ModuleOwner {
debug!("Finishing dynamic import for {:?}", module_identity);
unsafe {
- FinishDynamicModuleImport(
+ FinishDynamicModuleImport_NoTLA(
*cx,
status,
module.referencing_private.handle(),
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index f60c42f7e46..c44b4b04676 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -56,7 +56,7 @@ use js::jsapi::{
};
use js::jsapi::{HandleObject, Heap, JobQueue};
use js::jsapi::{JSContext as RawJSContext, JSTracer, SetDOMCallbacks, SetGCSliceCallback};
-use js::jsapi::{JSGCMode, JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption};
+use js::jsapi::{JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption};
use js::jsapi::{
JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled,
};
@@ -591,14 +591,16 @@ unsafe fn new_rt_and_cx_with_parent(
.unwrap_or(u32::max_value()),
);
// NOTE: This is disabled above, so enabling it here will do nothing for now.
- let js_gc_mode = if pref!(js.mem.gc.incremental.enabled) {
- JSGCMode::JSGC_MODE_INCREMENTAL
- } else if pref!(js.mem.gc.per_zone.enabled) {
- JSGCMode::JSGC_MODE_ZONE
- } else {
- JSGCMode::JSGC_MODE_GLOBAL
- };
- JS_SetGCParameter(cx, JSGCParamKey::JSGC_MODE, js_gc_mode as u32);
+ JS_SetGCParameter(
+ cx,
+ JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED,
+ pref!(js.mem.gc.incremental.enabled) as u32,
+ );
+ JS_SetGCParameter(
+ cx,
+ JSGCParamKey::JSGC_PER_ZONE_GC_ENABLED,
+ pref!(js.mem.gc.per_zone.enabled) as u32,
+ );
if let Some(val) = in_range(pref!(js.mem.gc.incremental.slice_ms), 0, 100_000) {
JS_SetGCParameter(cx, JSGCParamKey::JSGC_SLICE_TIME_BUDGET_MS, val as u32);
}
diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini
new file mode 100644
index 00000000000..f64b45fea6b
--- /dev/null
+++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini
@@ -0,0 +1,4 @@
+[hit-test-floats-002.html]
+ [Hit test float]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-list-001.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-list-001.html.ini
index 668c3f52a5b..03e29750425 100644
--- a/tests/wpt/metadata/css/cssom-view/elementFromPoint-list-001.html.ini
+++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-list-001.html.ini
@@ -14,3 +14,6 @@
[
Outside 3]
expected: FAIL
+ [Inside 3]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini
deleted file mode 100644
index e181af5397f..00000000000
--- a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-invalid-cases.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[elementsFromPoint-invalid-cases.html]
- [The root element is the last element returned for otherwise empty queries within the viewport]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini
index 4c5287a46be..87798a1d9c0 100644
--- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html.ini
@@ -5,3 +5,15 @@
[Test javascript URL string return values in direct and indirect (target) frame contexts. 9]
expected: FAIL
+ [Test javascript URL string return values in direct and indirect (target) frame contexts. 5]
+ expected: FAIL
+
+ [Test javascript URL string return values in direct and indirect (target) frame contexts. 6]
+ expected: FAIL
+
+ [Test javascript URL string return values in direct and indirect (target) frame contexts. 7]
+ expected: FAIL
+
+ [Test javascript URL string return values in direct and indirect (target) frame contexts. 8]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini b/tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini
index a19e3c219d9..1e84a603e36 100644
--- a/tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini
+++ b/tests/wpt/metadata/html/semantics/forms/textfieldselection/select-event.html.ini
@@ -2,19 +2,19 @@
[input type search: setSelectionRange out of range a second time (must not fire select)]
expected: FAIL
- [input type text: selectionStart a second time (must not fire select)]
+ [input type url: selectionStart out of range a second time (must not fire select)]
expected: FAIL
- [input type search: setRangeText() a second time (must not fire select)]
+ [input type password: selectionEnd out of range a second time (must not fire select)]
expected: FAIL
- [textarea: selectionEnd a second time (must not fire select)]
+ [input type text: selectionEnd out of range a second time (must not fire select)]
expected: FAIL
- [input type tel: select() a second time (must not fire select)]
+ [input type tel: selectionEnd out of range a second time (must not fire select)]
expected: FAIL
- [input type url: setRangeText() a second time (must not fire select)]
+ [textarea: selectionStart out of range a second time (must not fire select)]
expected: FAIL
[input type text: selectionStart out of range a second time (must not fire select)]
@@ -29,16 +29,31 @@
[input type url: setSelectionRange out of range a second time (must not fire select)]
expected: FAIL
- [input type password: selectionDirection a second time (must not fire select)]
+ [input type password: select() a second time (must not fire select)]
expected: FAIL
- [textarea: selectionDirection a second time (must not fire select)]
+ [textarea: setRangeText() a second time (must not fire select)]
expected: FAIL
- [input type text: setSelectionRange out of range a second time (must not fire select)]
+ [input type text: selectionEnd a second time (must not fire select)]
expected: FAIL
- [input type url: selectionEnd a second time (must not fire select)]
+ [input type text: selectionDirection a second time (must not fire select)]
+ expected: FAIL
+
+ [input type text: setRangeText() a second time (must not fire select)]
+ expected: FAIL
+
+ [input type search: selectionStart a second time (must not fire select)]
+ expected: FAIL
+
+ [input type search: selectionEnd a second time (must not fire select)]
+ expected: FAIL
+
+ [input type tel: setRangeText() a second time (must not fire select)]
+ expected: FAIL
+
+ [input type tel: setSelectionRange out of range a second time (must not fire select)]
expected: FAIL
[input type password: selectionStart a second time (must not fire select)]
@@ -47,9 +62,3 @@
[input type password: setRangeText() a second time (must not fire select)]
expected: FAIL
- [input type password: selectionStart out of range a second time (must not fire select)]
- expected: FAIL
-
- [input type password: setSelectionRange out of range a second time (must not fire select)]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/wasm/jsapi/table/constructor-reftypes.tentative.any.js.ini b/tests/wpt/metadata/wasm/jsapi/table/constructor-reftypes.tentative.any.js.ini
deleted file mode 100644
index 3935496d6ef..00000000000
--- a/tests/wpt/metadata/wasm/jsapi/table/constructor-reftypes.tentative.any.js.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-[constructor-reftypes.tentative.any.html]
- [initialize anyfunc table with a bad default value]
- expected: FAIL
-
- [initialize externref table with default value]
- expected: FAIL
-
- [initialize anyfunc table with default value]
- expected: FAIL
-
-
-[constructor-reftypes.tentative.any.worker.html]
- [initialize anyfunc table with a bad default value]
- expected: FAIL
-
- [initialize externref table with default value]
- expected: FAIL
-
- [initialize anyfunc table with default value]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/wasm/jsapi/table/constructor.any.js.ini b/tests/wpt/metadata/wasm/jsapi/table/constructor.any.js.ini
new file mode 100644
index 00000000000..5e23cff4e1e
--- /dev/null
+++ b/tests/wpt/metadata/wasm/jsapi/table/constructor.any.js.ini
@@ -0,0 +1,9 @@
+[constructor.any.html]
+ [Stray argument]
+ expected: FAIL
+
+
+[constructor.any.worker.html]
+ [Stray argument]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/wasm/jsapi/table/get-set.any.js.ini b/tests/wpt/metadata/wasm/jsapi/table/get-set.any.js.ini
new file mode 100644
index 00000000000..b5ab690dbe5
--- /dev/null
+++ b/tests/wpt/metadata/wasm/jsapi/table/get-set.any.js.ini
@@ -0,0 +1,9 @@
+[get-set.any.worker.html]
+ [Missing arguments: set]
+ expected: FAIL
+
+
+[get-set.any.html]
+ [Missing arguments: set]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/wasm/jsapi/table/set-reftypes.tentative.any.js.ini b/tests/wpt/metadata/wasm/jsapi/table/set-reftypes.tentative.any.js.ini
deleted file mode 100644
index dd417d75980..00000000000
--- a/tests/wpt/metadata/wasm/jsapi/table/set-reftypes.tentative.any.js.ini
+++ /dev/null
@@ -1,15 +0,0 @@
-[set-reftypes.tentative.any.worker.html]
- [Arguments for externref table set]
- expected: FAIL
-
- [Arguments for anyfunc table set]
- expected: FAIL
-
-
-[set-reftypes.tentative.any.html]
- [Arguments for externref table set]
- expected: FAIL
-
- [Arguments for anyfunc table set]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini
new file mode 100644
index 00000000000..663a1f8fa30
--- /dev/null
+++ b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini
@@ -0,0 +1,5 @@
+[018.html]
+ expected: TIMEOUT
+ [origin of the script that invoked the method, javascript:]
+ expected: TIMEOUT
+