aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py23
-rw-r--r--tests/wpt/metadata/dom/idlharness.window.js.ini6
-rw-r--r--tests/wpt/metadata/fetch/api/idlharness.any.js.ini6
-rw-r--r--tests/wpt/metadata/url/idlharness.any.js.ini6
-rw-r--r--tests/wpt/metadata/xhr/idlharness.any.js.ini22
5 files changed, 15 insertions, 48 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 17ec39913d6..ad76ef5d8d3 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -1637,6 +1637,7 @@ class MethodDefiner(PropertyDefiner):
self.regular = [{"name": m.identifier.name,
"methodInfo": not m.isStatic(),
"length": methodLength(m),
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(m, descriptor)}
for m in methods]
@@ -1646,6 +1647,7 @@ class MethodDefiner(PropertyDefiner):
"methodInfo": False,
"selfHostedName": "ArrayValues",
"length": 0,
+ "flags": "0", # Not enumerable, per spec.
"condition": "Condition::Satisfied"})
# Generate the keys/values/entries aliases for value iterables.
@@ -1660,6 +1662,7 @@ class MethodDefiner(PropertyDefiner):
"methodInfo": False,
"selfHostedName": "ArrayKeys",
"length": 0,
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(m,
descriptor)
})
@@ -1668,6 +1671,7 @@ class MethodDefiner(PropertyDefiner):
"methodInfo": False,
"selfHostedName": "ArrayValues",
"length": 0,
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(m,
descriptor)
})
@@ -1676,6 +1680,7 @@ class MethodDefiner(PropertyDefiner):
"methodInfo": False,
"selfHostedName": "ArrayEntries",
"length": 0,
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(m,
descriptor)
})
@@ -1684,6 +1689,7 @@ class MethodDefiner(PropertyDefiner):
"methodInfo": False,
"selfHostedName": "ArrayForEach",
"length": 1,
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(m,
descriptor)
})
@@ -1696,6 +1702,7 @@ class MethodDefiner(PropertyDefiner):
"name": "toString",
"nativeName": stringifier.identifier.name,
"length": 0,
+ "flags": "JSPROP_ENUMERATE",
"condition": PropertyDefiner.getControllingCondition(stringifier, descriptor)
})
self.unforgeable = unforgeable
@@ -1707,13 +1714,10 @@ class MethodDefiner(PropertyDefiner):
def condition(m, d):
return m["condition"]
- flags = "JSPROP_ENUMERATE"
- if self.unforgeable:
- flags += " | JSPROP_PERMANENT | JSPROP_READONLY"
-
def specData(m):
- # TODO: Use something like JS_FNSPEC
- # https://github.com/servo/servo/issues/6391
+ flags = m["flags"]
+ if self.unforgeable:
+ flags += " | JSPROP_PERMANENT | JSPROP_READONLY"
if "selfHostedName" in m:
selfHostedName = '%s as *const u8 as *const libc::c_char' % str_to_const_array(m["selfHostedName"])
assert not m.get("methodInfo", True)
@@ -3075,12 +3079,14 @@ assert!((*cache)[PrototypeList::Constructor::%(id)s as usize].is_null());
symbolJSID=symbolJSID))
defineFn = "JS_DefinePropertyById2"
prop = "iteratorId.handle()"
+ enumFlags = "0" # Not enumerable, per spec.
elif alias.startswith("@@"):
raise TypeError("Can't handle any well-known Symbol other than @@iterator")
else:
getSymbolJSID = None
defineFn = "JS_DefineProperty"
prop = '"%s"' % alias
+ enumFlags = "JSPROP_ENUMERATE"
return CGList([
getSymbolJSID,
# XXX If we ever create non-enumerable properties that can
@@ -3089,10 +3095,11 @@ assert!((*cache)[PrototypeList::Constructor::%(id)s as usize].is_null());
CGGeneric(fill(
"""
assert!(${defineFn}(*cx, prototype.handle(), ${prop}, aliasedVal.handle(),
- JSPROP_ENUMERATE as u32));
+ ${enumFlags} as u32));
""",
defineFn=defineFn,
- prop=prop))
+ prop=prop,
+ enumFlags=enumFlags))
], "\n")
def defineAliasesFor(m):
diff --git a/tests/wpt/metadata/dom/idlharness.window.js.ini b/tests/wpt/metadata/dom/idlharness.window.js.ini
index b8f32512457..1704974d9ed 100644
--- a/tests/wpt/metadata/dom/idlharness.window.js.ini
+++ b/tests/wpt/metadata/dom/idlharness.window.js.ini
@@ -229,9 +229,6 @@
[AbortSignal interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
- [DOMTokenList interface: iterable<DOMString>]
- expected: FAIL
-
[Document interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
@@ -487,9 +484,6 @@
[AbstractRange interface: attribute endOffset]
expected: FAIL
- [NodeList interface: iterable<Node>]
- expected: FAIL
-
[CharacterData interface: operation before([object Object\],[object Object\])]
expected: FAIL
diff --git a/tests/wpt/metadata/fetch/api/idlharness.any.js.ini b/tests/wpt/metadata/fetch/api/idlharness.any.js.ini
index a6ac97ab1e0..60fcabdf732 100644
--- a/tests/wpt/metadata/fetch/api/idlharness.any.js.ini
+++ b/tests/wpt/metadata/fetch/api/idlharness.any.js.ini
@@ -64,9 +64,6 @@
[Request interface: new Request('about:blank') must inherit property "isReloadNavigation" with the proper type]
expected: FAIL
- [Headers interface: iterable<ByteString, ByteString>]
- expected: FAIL
-
[Request interface: new Request('about:blank') must inherit property "signal" with the proper type]
expected: FAIL
@@ -147,9 +144,6 @@
[Request interface: new Request('about:blank') must inherit property "isReloadNavigation" with the proper type]
expected: FAIL
- [Headers interface: iterable<ByteString, ByteString>]
- expected: FAIL
-
[Request interface: new Request('about:blank') must inherit property "signal" with the proper type]
expected: FAIL
diff --git a/tests/wpt/metadata/url/idlharness.any.js.ini b/tests/wpt/metadata/url/idlharness.any.js.ini
index 70a60c1c261..c7f8449baa1 100644
--- a/tests/wpt/metadata/url/idlharness.any.js.ini
+++ b/tests/wpt/metadata/url/idlharness.any.js.ini
@@ -8,9 +8,6 @@
[URL interface: legacy window alias]
expected: FAIL
- [URLSearchParams interface: iterable<USVString, USVString>]
- expected: FAIL
-
[idlharness.any.worker.html]
[idlharness]
@@ -19,6 +16,3 @@
[Testing Symbol.iterator property of iterable interface URLSearchParams]
expected: FAIL
- [URLSearchParams interface: iterable<USVString, USVString>]
- expected: FAIL
-
diff --git a/tests/wpt/metadata/xhr/idlharness.any.js.ini b/tests/wpt/metadata/xhr/idlharness.any.js.ini
index e95b52687fb..0093adff9e3 100644
--- a/tests/wpt/metadata/xhr/idlharness.any.js.ini
+++ b/tests/wpt/metadata/xhr/idlharness.any.js.ini
@@ -1,26 +1,4 @@
-[idlharness.any.html]
- [idlharness]
- expected: FAIL
-
- [Testing Symbol.iterator property of iterable interface FormData]
- expected: FAIL
-
- [FormData interface: iterable<USVString, FormDataEntryValue>]
- expected: FAIL
-
-
[idlharness.any.sharedworker.html]
[idlharness]
expected: FAIL
-
-[idlharness.any.worker.html]
- [idlharness]
- expected: FAIL
-
- [Testing Symbol.iterator property of iterable interface FormData]
- expected: FAIL
-
- [FormData interface: iterable<USVString, FormDataEntryValue>]
- expected: FAIL
-