From 08eb4faf4d2805283137a19739b092cd7ddff600 Mon Sep 17 00:00:00 2001 From: Taym Haddadi Date: Thu, 8 Aug 2024 12:12:45 +0200 Subject: [PATCH] Initial structuredClone implementation (#32960) * Initial structuredClone implementation Signed-off-by: Bentaimia Haddadi * Rename PostMessageOptions to StructuredSerializeOptions Signed-off-by: Bentaimia Haddadi * Update wpt test 2020 layout result Signed-off-by: Bentaimia Haddadi * Remove dublicated StructuredClone implementation Signed-off-by: Bentaimia Haddadi * Remove comment from StructuredSerializeOptions webidl Signed-off-by: Taym Haddadi --------- Signed-off-by: Bentaimia Haddadi Signed-off-by: Taym Haddadi --- .../script/dom/dedicatedworkerglobalscope.rs | 4 +- components/script/dom/globalscope.rs | 32 +- components/script/dom/messageport.rs | 4 +- components/script/dom/serviceworker.rs | 4 +- .../webidls/DedicatedWorkerGlobalScope.webidl | 2 +- .../script/dom/webidls/MessagePort.webidl | 4 +- .../script/dom/webidls/ServiceWorker.webidl | 2 +- components/script/dom/webidls/Window.webidl | 2 +- .../webidls/WindowOrWorkerGlobalScope.webidl | 4 + components/script/dom/webidls/Worker.webidl | 2 +- components/script/dom/window.rs | 12 + components/script/dom/worker.rs | 4 +- components/script/dom/workerglobalscope.rs | 12 + .../url/historical.any.js.ini | 14 - .../meta/html/dom/idlharness.https.html.ini | 9 - .../meta/html/dom/idlharness.worker.js.ini | 9 - ...ing-error-stack-optional.sub.window.js.ini | 6 - ...ructured-clone-cross-realm-method.html.ini | 12 - .../structured-clone.any.js.ini | 784 +----------------- tests/wpt/meta/url/historical.any.js.ini | 14 - 20 files changed, 74 insertions(+), 862 deletions(-) delete mode 100644 tests/wpt/meta-legacy-layout/url/historical.any.js.ini delete mode 100644 tests/wpt/meta/html/webappapis/structured-clone/structured-clone-cross-realm-method.html.ini delete mode 100644 tests/wpt/meta/url/historical.any.js.ini diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs index 2f1c55c99f9..62c156b55de 100644 --- a/components/script/dom/dedicatedworkerglobalscope.rs +++ b/components/script/dom/dedicatedworkerglobalscope.rs @@ -34,7 +34,7 @@ use crate::dom::abstractworkerglobalscope::{ use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding; use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods; -use crate::dom::bindings::codegen::Bindings::MessagePortBinding::PostMessageOptions; +use crate::dom::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use crate::dom::bindings::codegen::Bindings::WorkerBinding::WorkerType; use crate::dom::bindings::error::{ErrorInfo, ErrorResult}; use crate::dom::bindings::inheritance::Castable; @@ -659,7 +659,7 @@ impl DedicatedWorkerGlobalScopeMethods for DedicatedWorkerGlobalScope { &self, cx: SafeJSContext, message: HandleValue, - options: RootedTraceableBox, + options: RootedTraceableBox, ) -> ErrorResult { let mut rooted = CustomAutoRooter::new( options diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs index f1537b25ebd..2d8959386f8 100644 --- a/components/script/dom/globalscope.rs +++ b/components/script/dom/globalscope.rs @@ -36,7 +36,8 @@ use js::panic::maybe_resume_unwind; use js::rust::wrappers::{JS_ExecuteScript, JS_GetScriptPrivate}; use js::rust::{ describe_scripted_caller, get_object_class, transform_str_to_source_text, - CompileOptionsWrapper, HandleValue, MutableHandleValue, ParentRuntime, Runtime, + CompileOptionsWrapper, CustomAutoRooter, CustomAutoRooterGuard, HandleValue, + MutableHandleValue, ParentRuntime, Runtime, }; use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL}; use net_traits::blob_url_store::{get_blob_origin, BlobBuf}; @@ -59,8 +60,10 @@ use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl}; use uuid::Uuid; use webgpu::{DeviceLostReason, WebGPUDevice}; +use super::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use super::bindings::codegen::Bindings::WebGPUBinding::GPUDeviceLostReason; -use super::bindings::trace::HashMapTracedValues; +use super::bindings::error::Fallible; +use super::bindings::trace::{HashMapTracedValues, RootedTraceableBox}; use crate::dom::bindings::cell::{DomRefCell, RefMut}; use crate::dom::bindings::codegen::Bindings::BroadcastChannelBinding::BroadcastChannelMethods; use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSource_Binding::EventSourceMethods; @@ -3354,6 +3357,31 @@ impl GlobalScope { pub(crate) fn dynamic_module_list(&self) -> RefMut { self.dynamic_modules.borrow_mut() } + + pub(crate) fn structured_clone( + &self, + cx: SafeJSContext, + value: HandleValue, + options: RootedTraceableBox, + ) -> Fallible { + let mut rooted = CustomAutoRooter::new( + options + .transfer + .iter() + .map(|js: &RootedTraceableBox>| js.get()) + .collect(), + ); + let guard = CustomAutoRooterGuard::new(*cx, &mut rooted); + + let data = structuredclone::write(cx, value, Some(guard))?; + + rooted!(in(*cx) let mut message_clone = UndefinedValue()); + + structuredclone::read(self, data, message_clone.handle_mut()) + .map_err(|_| Error::DataClone)?; + + Ok(message_clone.get()) + } } /// Returns the Rust global scope from a JS global object. diff --git a/components/script/dom/messageport.rs b/components/script/dom/messageport.rs index c7086c9403c..f5117cf209f 100644 --- a/components/script/dom/messageport.rs +++ b/components/script/dom/messageport.rs @@ -16,7 +16,7 @@ use script_traits::PortMessageTask; use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use crate::dom::bindings::codegen::Bindings::MessagePortBinding::{ - MessagePortMethods, PostMessageOptions, + MessagePortMethods, StructuredSerializeOptions, }; use crate::dom::bindings::conversions::root_from_object; use crate::dom::bindings::error::{Error, ErrorResult}; @@ -288,7 +288,7 @@ impl MessagePortMethods for MessagePort { &self, cx: SafeJSContext, message: HandleValue, - options: RootedTraceableBox, + options: RootedTraceableBox, ) -> ErrorResult { if self.detached.get() { return Ok(()); diff --git a/components/script/dom/serviceworker.rs b/components/script/dom/serviceworker.rs index 02f7b60f4c0..b3b9738340a 100644 --- a/components/script/dom/serviceworker.rs +++ b/components/script/dom/serviceworker.rs @@ -13,7 +13,7 @@ use servo_url::ServoUrl; use crate::dom::abstractworker::SimpleWorkerErrorHandler; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::MessagePortBinding::PostMessageOptions; +use crate::dom::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use crate::dom::bindings::codegen::Bindings::ServiceWorkerBinding::{ ServiceWorkerMethods, ServiceWorkerState, }; @@ -144,7 +144,7 @@ impl ServiceWorkerMethods for ServiceWorker { &self, cx: JSContext, message: HandleValue, - options: RootedTraceableBox, + options: RootedTraceableBox, ) -> ErrorResult { let mut rooted = CustomAutoRooter::new( options diff --git a/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl index 43ff22b5f6d..ad5c36e29b4 100644 --- a/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl +++ b/components/script/dom/webidls/DedicatedWorkerGlobalScope.webidl @@ -6,7 +6,7 @@ [Global=(Worker,DedicatedWorker), Exposed=DedicatedWorker] /*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope { [Throws] undefined postMessage(any message, sequence transfer); - [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, optional StructuredSerializeOptions options = {}); attribute EventHandler onmessage; undefined close(); diff --git a/components/script/dom/webidls/MessagePort.webidl b/components/script/dom/webidls/MessagePort.webidl index 2ba531ce5b2..6fc1f432b38 100644 --- a/components/script/dom/webidls/MessagePort.webidl +++ b/components/script/dom/webidls/MessagePort.webidl @@ -9,7 +9,7 @@ [Exposed=(Window,Worker)] interface MessagePort : EventTarget { [Throws] undefined postMessage(any message, sequence transfer); - [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, optional StructuredSerializeOptions options = {}); undefined start(); undefined close(); @@ -18,6 +18,6 @@ interface MessagePort : EventTarget { attribute EventHandler onmessageerror; }; -dictionary PostMessageOptions { +dictionary StructuredSerializeOptions { sequence transfer = []; }; diff --git a/components/script/dom/webidls/ServiceWorker.webidl b/components/script/dom/webidls/ServiceWorker.webidl index b91a4c55b51..263737d03f9 100644 --- a/components/script/dom/webidls/ServiceWorker.webidl +++ b/components/script/dom/webidls/ServiceWorker.webidl @@ -8,7 +8,7 @@ interface ServiceWorker : EventTarget { readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state; [Throws] undefined postMessage(any message, sequence transfer); - [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, optional StructuredSerializeOptions options = {}); // event attribute EventHandler onstatechange; diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 35e608f23b3..44db6f08887 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -188,6 +188,6 @@ partial interface Window { [Replaceable] readonly attribute any event; // historical }; -dictionary WindowPostMessageOptions : PostMessageOptions { +dictionary WindowPostMessageOptions : StructuredSerializeOptions { USVString targetOrigin = "/"; }; diff --git a/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl b/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl index 0d28857ec58..dbcce406a43 100644 --- a/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl +++ b/components/script/dom/webidls/WindowOrWorkerGlobalScope.webidl @@ -28,6 +28,10 @@ interface mixin WindowOrWorkerGlobalScope { Promise createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); // Promise createImageBitmap( // ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options); + + // structured cloning + [Throws] + any structuredClone(any value, optional StructuredSerializeOptions options = {}); }; // https://w3c.github.io/hr-time/#the-performance-attribute diff --git a/components/script/dom/webidls/Worker.webidl b/components/script/dom/webidls/Worker.webidl index b391d65b2ab..ef535126606 100644 --- a/components/script/dom/webidls/Worker.webidl +++ b/components/script/dom/webidls/Worker.webidl @@ -15,7 +15,7 @@ interface Worker : EventTarget { undefined terminate(); [Throws] undefined postMessage(any message, sequence transfer); - [Throws] undefined postMessage(any message, optional PostMessageOptions options = {}); + [Throws] undefined postMessage(any message, optional StructuredSerializeOptions options = {}); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 1448adb8c5a..90ba17a9cbf 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -77,6 +77,7 @@ use webrender_api::units::{DeviceIntPoint, DeviceIntSize, LayoutPixel}; use webrender_api::{DocumentId, ExternalScrollId}; use webrender_traits::WebRenderScriptApi; +use super::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use super::bindings::trace::HashMapTracedValues; use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ @@ -1560,6 +1561,17 @@ impl WindowMethods for Window { .map(|(k, _v)| DOMString::from(&***k)) .collect() } + + /// + fn StructuredClone( + &self, + cx: JSContext, + value: HandleValue, + options: RootedTraceableBox, + ) -> Fallible { + self.upcast::() + .structured_clone(cx, value, options) + } } impl Window { diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs index 2ea9b3e497c..9158579c599 100644 --- a/components/script/dom/worker.rs +++ b/components/script/dom/worker.rs @@ -18,7 +18,7 @@ use uuid::Uuid; use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg}; use crate::dom::bindings::cell::DomRefCell; -use crate::dom::bindings::codegen::Bindings::MessagePortBinding::PostMessageOptions; +use crate::dom::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use crate::dom::bindings::codegen::Bindings::WorkerBinding::{WorkerMethods, WorkerOptions}; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; @@ -243,7 +243,7 @@ impl WorkerMethods for Worker { &self, cx: JSContext, message: HandleValue, - options: RootedTraceableBox, + options: RootedTraceableBox, ) -> ErrorResult { let mut rooted = CustomAutoRooter::new( options diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs index eb06d88c818..af622d7b90d 100644 --- a/components/script/dom/workerglobalscope.rs +++ b/components/script/dom/workerglobalscope.rs @@ -24,6 +24,7 @@ use servo_url::{MutableOrigin, ServoUrl}; use time::precise_time_ns; use uuid::Uuid; +use super::bindings::codegen::Bindings::MessagePortBinding::StructuredSerializeOptions; use crate::dom::bindings::cell::{DomRefCell, Ref}; use crate::dom::bindings::codegen::Bindings::ImageBitmapBinding::{ ImageBitmapOptions, ImageBitmapSource, @@ -431,6 +432,17 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope { fn IsSecureContext(&self) -> bool { self.upcast::().is_secure_context() } + + /// + fn StructuredClone( + &self, + cx: JSContext, + value: HandleValue, + options: RootedTraceableBox, + ) -> Fallible { + self.upcast::() + .structured_clone(cx, value, options) + } } impl WorkerGlobalScope { diff --git a/tests/wpt/meta-legacy-layout/url/historical.any.js.ini b/tests/wpt/meta-legacy-layout/url/historical.any.js.ini deleted file mode 100644 index b26363f4e74..00000000000 --- a/tests/wpt/meta-legacy-layout/url/historical.any.js.ini +++ /dev/null @@ -1,14 +0,0 @@ -[historical.any.html] - [URL: no structured serialize/deserialize support] - expected: FAIL - - [URLSearchParams: no structured serialize/deserialize support] - expected: FAIL - - -[historical.any.worker.html] - [URL: no structured serialize/deserialize support] - expected: FAIL - - [URLSearchParams: no structured serialize/deserialize support] - expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.https.html.ini b/tests/wpt/meta/html/dom/idlharness.https.html.ini index 5a661362c01..deb66bf7482 100644 --- a/tests/wpt/meta/html/dom/idlharness.https.html.ini +++ b/tests/wpt/meta/html/dom/idlharness.https.html.ini @@ -2379,9 +2379,6 @@ [Window interface: operation reportError(any)] expected: FAIL - [Window interface: operation structuredClone(any, optional StructuredSerializeOptions)] - expected: FAIL - [Window interface: window must inherit property "clientInformation" with the proper type] expected: FAIL @@ -2397,12 +2394,6 @@ [Window interface: calling reportError(any) on window with too few arguments must throw TypeError] expected: FAIL - [Window interface: window must inherit property "structuredClone(any, optional StructuredSerializeOptions)" with the proper type] - expected: FAIL - - [Window interface: calling structuredClone(any, optional StructuredSerializeOptions) on window with too few arguments must throw TypeError] - expected: FAIL - [Document interface: attribute onvisibilitychange] expected: FAIL diff --git a/tests/wpt/meta/html/dom/idlharness.worker.js.ini b/tests/wpt/meta/html/dom/idlharness.worker.js.ini index af14091370e..b8a3f50d3df 100644 --- a/tests/wpt/meta/html/dom/idlharness.worker.js.ini +++ b/tests/wpt/meta/html/dom/idlharness.worker.js.ini @@ -548,21 +548,12 @@ [WorkerGlobalScope interface: operation reportError(any)] expected: FAIL - [WorkerGlobalScope interface: operation structuredClone(any, optional StructuredSerializeOptions)] - expected: FAIL - [WorkerGlobalScope interface: self must inherit property "reportError(any)" with the proper type] expected: FAIL [WorkerGlobalScope interface: calling reportError(any) on self with too few arguments must throw TypeError] expected: FAIL - [WorkerGlobalScope interface: self must inherit property "structuredClone(any, optional StructuredSerializeOptions)" with the proper type] - expected: FAIL - - [WorkerGlobalScope interface: calling structuredClone(any, optional StructuredSerializeOptions) on self with too few arguments must throw TypeError] - expected: FAIL - [Path2D interface: operation roundRect(unrestricted double, unrestricted double, unrestricted double, unrestricted double, optional (unrestricted double or DOMPointInit or sequence<(unrestricted double or DOMPointInit)>))] expected: FAIL diff --git a/tests/wpt/meta/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js.ini b/tests/wpt/meta/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js.ini index 9494d845f2c..c8a80140995 100644 --- a/tests/wpt/meta/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js.ini +++ b/tests/wpt/meta/html/infrastructure/safe-passing-of-structured-data/structured-cloning-error-stack-optional.sub.window.js.ini @@ -1,10 +1,4 @@ [structured-cloning-error-stack-optional.sub.window.html] - [page-created Error (structuredClone())] - expected: FAIL - - [JS-engine-created TypeError (structuredClone())] - expected: FAIL - [web API-created TypeError (structuredClone())] expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/structured-clone/structured-clone-cross-realm-method.html.ini b/tests/wpt/meta/html/webappapis/structured-clone/structured-clone-cross-realm-method.html.ini deleted file mode 100644 index 2106cf6ad82..00000000000 --- a/tests/wpt/meta/html/webappapis/structured-clone/structured-clone-cross-realm-method.html.ini +++ /dev/null @@ -1,12 +0,0 @@ -[structured-clone-cross-realm-method.html] - [Object instance] - expected: FAIL - - [Array instance] - expected: FAIL - - [Date instance] - expected: FAIL - - [RegExp instance] - expected: FAIL diff --git a/tests/wpt/meta/html/webappapis/structured-clone/structured-clone.any.js.ini b/tests/wpt/meta/html/webappapis/structured-clone/structured-clone.any.js.ini index e3765e4c803..37242452e1f 100644 --- a/tests/wpt/meta/html/webappapis/structured-clone/structured-clone.any.js.ini +++ b/tests/wpt/meta/html/webappapis/structured-clone/structured-clone.any.js.ini @@ -1,687 +1,21 @@ [structured-clone.any.worker.html] - [primitive undefined] - expected: FAIL - - [primitive null] - expected: FAIL - - [primitive true] - expected: FAIL - - [primitive false] - expected: FAIL - - [primitive string, empty string] - expected: FAIL - - [primitive string, lone high surrogate] - expected: FAIL - - [primitive string, lone low surrogate] - expected: FAIL - - [primitive string, NUL] - expected: FAIL - - [primitive string, astral character] - expected: FAIL - - [primitive number, 0.2] - expected: FAIL - - [primitive number, 0] - expected: FAIL - - [primitive number, -0] - expected: FAIL - - [primitive number, NaN] - expected: FAIL - - [primitive number, Infinity] - expected: FAIL - - [primitive number, -Infinity] - expected: FAIL - - [primitive number, 9007199254740992] - expected: FAIL - - [primitive number, -9007199254740992] - expected: FAIL - - [primitive number, 9007199254740994] - expected: FAIL - - [primitive number, -9007199254740994] - expected: FAIL - - [primitive BigInt, 0n] - expected: FAIL - - [primitive BigInt, -0n] - expected: FAIL - - [primitive BigInt, -9007199254740994000n] - expected: FAIL - - [primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n] - expected: FAIL - - [Array primitives] - expected: FAIL - - [Object primitives] - expected: FAIL - - [Boolean true] - expected: FAIL - - [Boolean false] - expected: FAIL - - [Array Boolean objects] - expected: FAIL - - [Object Boolean objects] - expected: FAIL - - [String empty string] - expected: FAIL - - [String lone high surrogate] - expected: FAIL - - [String lone low surrogate] - expected: FAIL - - [String NUL] - expected: FAIL - - [String astral character] - expected: FAIL - - [Array String objects] - expected: FAIL - - [Object String objects] - expected: FAIL - - [Number 0.2] - expected: FAIL - - [Number 0] - expected: FAIL - - [Number -0] - expected: FAIL - - [Number NaN] - expected: FAIL - - [Number Infinity] - expected: FAIL - - [Number -Infinity] - expected: FAIL - - [Number 9007199254740992] - expected: FAIL - - [Number -9007199254740992] - expected: FAIL - - [Number 9007199254740994] - expected: FAIL - - [Number -9007199254740994] - expected: FAIL - - [BigInt -9007199254740994n] - expected: FAIL - - [Array Number objects] - expected: FAIL - - [Object Number objects] - expected: FAIL - - [Date 0] - expected: FAIL - - [Date -0] - expected: FAIL - - [Date -8.64e15] - expected: FAIL - - [Date 8.64e15] - expected: FAIL - - [Array Date objects] - expected: FAIL - - [Object Date objects] - expected: FAIL - - [RegExp flags and lastIndex] - expected: FAIL - - [RegExp sticky flag] - expected: FAIL - - [RegExp unicode flag] - expected: FAIL - - [RegExp empty] - expected: FAIL - - [RegExp slash] - expected: FAIL - - [RegExp new line] - expected: FAIL - - [Array RegExp object, RegExp flags and lastIndex] - expected: FAIL - - [Array RegExp object, RegExp sticky flag] - expected: FAIL - - [Array RegExp object, RegExp unicode flag] - expected: FAIL - - [Array RegExp object, RegExp empty] - expected: FAIL - - [Array RegExp object, RegExp slash] - expected: FAIL - - [Array RegExp object, RegExp new line] - expected: FAIL - - [Object RegExp object, RegExp flags and lastIndex] - expected: FAIL - - [Object RegExp object, RegExp sticky flag] - expected: FAIL - - [Object RegExp object, RegExp unicode flag] - expected: FAIL - - [Object RegExp object, RegExp empty] - expected: FAIL - - [Object RegExp object, RegExp slash] - expected: FAIL - - [Object RegExp object, RegExp new line] - expected: FAIL - - [Blob basic] - expected: FAIL - - [Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Blob empty] - expected: FAIL - - [Blob NUL] - expected: FAIL - - [Array Blob object, Blob basic] - expected: FAIL - - [Array Blob object, Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob empty] - expected: FAIL - - [Array Blob object, Blob NUL] - expected: FAIL - - [Array Blob object, two Blobs] - expected: FAIL - - [Object Blob object, Blob basic] - expected: FAIL - - [Object Blob object, Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob empty] - expected: FAIL - - [Object Blob object, Blob NUL] - expected: FAIL - [File basic] expected: FAIL - [Array sparse] - expected: FAIL - - [Array with non-index property] - expected: FAIL - - [Object with index property and length] - expected: FAIL - - [Array with circular reference] - expected: FAIL - - [Object with circular reference] - expected: FAIL - - [Array with identical property values] - expected: FAIL - - [Object with identical property values] - expected: FAIL - - [Object with property on prototype] - expected: FAIL - - [Object with non-enumerable property] - expected: FAIL - - [Object with non-writable property] - expected: FAIL - - [Object with non-configurable property] - expected: FAIL - - [ObjectPrototype must lose its exotic-ness when cloned] - expected: FAIL - - [ArrayBuffer] - expected: FAIL - - [MessagePort] - expected: FAIL - - [Serializing a non-serializable platform object fails] - expected: FAIL - - [An object whose interface is deleted from the global must still deserialize] - expected: FAIL - [A subclass instance will deserialize as its closest serializable superclass] expected: FAIL - [A detached ArrayBuffer cannot be transferred] - expected: FAIL - - [A detached platform object cannot be transferred] - expected: FAIL - - [Transferring a non-transferable platform object fails] - expected: FAIL - - [An object whose interface is deleted from the global object must still be received] - expected: FAIL - [A subclass instance will be received as its closest transferable superclass] - expected: FAIL - - [Empty Error object] - expected: FAIL - - [Error object] - expected: FAIL - - [EvalError object] - expected: FAIL - - [RangeError object] - expected: FAIL - - [ReferenceError object] - expected: FAIL - - [SyntaxError object] - expected: FAIL - - [TypeError object] - expected: FAIL - - [URIError object] - expected: FAIL + expected: PRECONDITION_FAILED [Object with a getter that throws] expected: FAIL - [Resizable ArrayBuffer] - expected: FAIL - [Growable SharedArrayBuffer] expected: FAIL - [Length-tracking TypedArray] - expected: FAIL - - [Length-tracking DataView] - expected: FAIL - - [Serializing OOB TypedArray throws] - expected: FAIL - - [Serializing OOB DataView throws] - expected: FAIL - - [Resizable ArrayBuffer is transferable] - expected: FAIL - - [Length-tracking TypedArray is transferable] - expected: FAIL - - [Length-tracking DataView is transferable] - expected: FAIL - - [Transferring OOB TypedArray throws] - expected: FAIL - - [Transferring OOB DataView throws] - expected: FAIL - [structured-clone.any.html] - [primitive undefined] - expected: FAIL - - [primitive null] - expected: FAIL - - [primitive true] - expected: FAIL - - [primitive false] - expected: FAIL - - [primitive string, empty string] - expected: FAIL - - [primitive string, lone high surrogate] - expected: FAIL - - [primitive string, lone low surrogate] - expected: FAIL - - [primitive string, NUL] - expected: FAIL - - [primitive string, astral character] - expected: FAIL - - [primitive number, 0.2] - expected: FAIL - - [primitive number, 0] - expected: FAIL - - [primitive number, -0] - expected: FAIL - - [primitive number, NaN] - expected: FAIL - - [primitive number, Infinity] - expected: FAIL - - [primitive number, -Infinity] - expected: FAIL - - [primitive number, 9007199254740992] - expected: FAIL - - [primitive number, -9007199254740992] - expected: FAIL - - [primitive number, 9007199254740994] - expected: FAIL - - [primitive number, -9007199254740994] - expected: FAIL - - [primitive BigInt, 0n] - expected: FAIL - - [primitive BigInt, -0n] - expected: FAIL - - [primitive BigInt, -9007199254740994000n] - expected: FAIL - - [primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n] - expected: FAIL - - [Array primitives] - expected: FAIL - - [Object primitives] - expected: FAIL - - [Boolean true] - expected: FAIL - - [Boolean false] - expected: FAIL - - [Array Boolean objects] - expected: FAIL - - [Object Boolean objects] - expected: FAIL - - [String empty string] - expected: FAIL - - [String lone high surrogate] - expected: FAIL - - [String lone low surrogate] - expected: FAIL - - [String NUL] - expected: FAIL - - [String astral character] - expected: FAIL - - [Array String objects] - expected: FAIL - - [Object String objects] - expected: FAIL - - [Number 0.2] - expected: FAIL - - [Number 0] - expected: FAIL - - [Number -0] - expected: FAIL - - [Number NaN] - expected: FAIL - - [Number Infinity] - expected: FAIL - - [Number -Infinity] - expected: FAIL - - [Number 9007199254740992] - expected: FAIL - - [Number -9007199254740992] - expected: FAIL - - [Number 9007199254740994] - expected: FAIL - - [Number -9007199254740994] - expected: FAIL - - [BigInt -9007199254740994n] - expected: FAIL - - [Array Number objects] - expected: FAIL - - [Object Number objects] - expected: FAIL - - [Date 0] - expected: FAIL - - [Date -0] - expected: FAIL - - [Date -8.64e15] - expected: FAIL - - [Date 8.64e15] - expected: FAIL - - [Array Date objects] - expected: FAIL - - [Object Date objects] - expected: FAIL - - [RegExp flags and lastIndex] - expected: FAIL - - [RegExp sticky flag] - expected: FAIL - - [RegExp unicode flag] - expected: FAIL - - [RegExp empty] - expected: FAIL - - [RegExp slash] - expected: FAIL - - [RegExp new line] - expected: FAIL - - [Array RegExp object, RegExp flags and lastIndex] - expected: FAIL - - [Array RegExp object, RegExp sticky flag] - expected: FAIL - - [Array RegExp object, RegExp unicode flag] - expected: FAIL - - [Array RegExp object, RegExp empty] - expected: FAIL - - [Array RegExp object, RegExp slash] - expected: FAIL - - [Array RegExp object, RegExp new line] - expected: FAIL - - [Object RegExp object, RegExp flags and lastIndex] - expected: FAIL - - [Object RegExp object, RegExp sticky flag] - expected: FAIL - - [Object RegExp object, RegExp unicode flag] - expected: FAIL - - [Object RegExp object, RegExp empty] - expected: FAIL - - [Object RegExp object, RegExp slash] - expected: FAIL - - [Object RegExp object, RegExp new line] - expected: FAIL - - [Blob basic] - expected: FAIL - - [Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Blob empty] - expected: FAIL - - [Blob NUL] - expected: FAIL - - [Array Blob object, Blob basic] - expected: FAIL - - [Array Blob object, Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Array Blob object, Blob empty] - expected: FAIL - - [Array Blob object, Blob NUL] - expected: FAIL - - [Array Blob object, two Blobs] - expected: FAIL - - [Object Blob object, Blob basic] - expected: FAIL - - [Object Blob object, Blob unpaired high surrogate (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob unpaired low surrogate (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob paired surrogates (invalid utf-8)] - expected: FAIL - - [Object Blob object, Blob empty] - expected: FAIL - - [Object Blob object, Blob NUL] - expected: FAIL - [File basic] expected: FAIL @@ -712,39 +46,6 @@ [Object ImageData object, ImageData 1x1 non-transparent non-black] expected: FAIL - [Array sparse] - expected: FAIL - - [Array with non-index property] - expected: FAIL - - [Object with index property and length] - expected: FAIL - - [Array with circular reference] - expected: FAIL - - [Object with circular reference] - expected: FAIL - - [Array with identical property values] - expected: FAIL - - [Object with identical property values] - expected: FAIL - - [Object with property on prototype] - expected: FAIL - - [Object with non-enumerable property] - expected: FAIL - - [Object with non-writable property] - expected: FAIL - - [Object with non-configurable property] - expected: FAIL - [ImageBitmap 1x1 transparent black] expected: FAIL @@ -763,95 +64,14 @@ [Object ImageBitmap object, ImageBitmap 1x1 transparent non-black] expected: FAIL - [ObjectPrototype must lose its exotic-ness when cloned] - expected: FAIL - - [ArrayBuffer] - expected: FAIL - - [MessagePort] - expected: FAIL - - [Serializing a non-serializable platform object fails] - expected: FAIL - - [An object whose interface is deleted from the global must still deserialize] - expected: FAIL - [A subclass instance will deserialize as its closest serializable superclass] expected: FAIL - [A detached ArrayBuffer cannot be transferred] - expected: FAIL - - [A detached platform object cannot be transferred] - expected: FAIL - - [Transferring a non-transferable platform object fails] - expected: FAIL - - [An object whose interface is deleted from the global object must still be received] - expected: FAIL - [A subclass instance will be received as its closest transferable superclass] - expected: FAIL - - [Empty Error object] - expected: FAIL - - [Error object] - expected: FAIL - - [EvalError object] - expected: FAIL - - [RangeError object] - expected: FAIL - - [ReferenceError object] - expected: FAIL - - [SyntaxError object] - expected: FAIL - - [TypeError object] - expected: FAIL - - [URIError object] - expected: FAIL + expected: PRECONDITION_FAILED [Object with a getter that throws] expected: FAIL - [Resizable ArrayBuffer] - expected: FAIL - [Growable SharedArrayBuffer] expected: FAIL - - [Length-tracking TypedArray] - expected: FAIL - - [Length-tracking DataView] - expected: FAIL - - [Serializing OOB TypedArray throws] - expected: FAIL - - [Serializing OOB DataView throws] - expected: FAIL - - [Resizable ArrayBuffer is transferable] - expected: FAIL - - [Length-tracking TypedArray is transferable] - expected: FAIL - - [Length-tracking DataView is transferable] - expected: FAIL - - [Transferring OOB TypedArray throws] - expected: FAIL - - [Transferring OOB DataView throws] - expected: FAIL diff --git a/tests/wpt/meta/url/historical.any.js.ini b/tests/wpt/meta/url/historical.any.js.ini deleted file mode 100644 index 63b8512bd5d..00000000000 --- a/tests/wpt/meta/url/historical.any.js.ini +++ /dev/null @@ -1,14 +0,0 @@ -[historical.any.worker.html] - [URL: no structured serialize/deserialize support] - expected: FAIL - - [URLSearchParams: no structured serialize/deserialize support] - expected: FAIL - - -[historical.any.html] - [URL: no structured serialize/deserialize support] - expected: FAIL - - [URLSearchParams: no structured serialize/deserialize support] - expected: FAIL