зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1806994 - Define @@toStringTag on the WebAssembly namespace object. r=rhunt
Namespace objects have a class string (https://webidl.spec.whatwg.org/#ref-for-dfn-class-string⑨) so they need to have a @@toStringTag property (https://webidl.spec.whatwg.org/#ref-for-dfn-class-string). Depends on D165457 Differential Revision: https://phabricator.services.mozilla.com/D165458
This commit is contained in:
Родитель
5d6f458f88
Коммит
0f7ff57550
|
@ -5334,6 +5334,9 @@ static const JSFunctionSpec WebAssembly_static_methods[] = {
|
|||
JSPROP_ENUMERATE),
|
||||
JS_FS_END};
|
||||
|
||||
static const JSPropertySpec WebAssembly_static_properties[] = {
|
||||
JS_STRING_SYM_PS(toStringTag, "WebAssembly", JSPROP_READONLY), JS_PS_END};
|
||||
|
||||
static JSObject* CreateWebAssemblyObject(JSContext* cx, JSProtoKey key) {
|
||||
MOZ_RELEASE_ASSERT(HasSupport(cx));
|
||||
|
||||
|
@ -5414,13 +5417,10 @@ static bool WebAssemblyClassFinish(JSContext* cx, HandleObject object,
|
|||
return true;
|
||||
}
|
||||
|
||||
static const ClassSpec WebAssemblyClassSpec = {CreateWebAssemblyObject,
|
||||
nullptr,
|
||||
WebAssembly_static_methods,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
WebAssemblyClassFinish};
|
||||
static const ClassSpec WebAssemblyClassSpec = {
|
||||
CreateWebAssemblyObject, nullptr, WebAssembly_static_methods,
|
||||
WebAssembly_static_properties, nullptr, nullptr,
|
||||
WebAssemblyClassFinish};
|
||||
|
||||
const JSClass js::WasmNamespaceObject::class_ = {
|
||||
js_WebAssembly_str, JSCLASS_HAS_CACHED_PROTO(JSProto_WebAssembly),
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
[toStringTag.any.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[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]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[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.js]
|
||||
[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
|
Загрузка…
Ссылка в новой задаче