summaryrefslogtreecommitdiffstats
path: root/dom/bindings/Codegen.py
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:25:15 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-08-18 16:26:16 +0200
commit202296d02aa99afa90581333ab059c050b9c3ade (patch)
tree6ed8a1289bed1bb06d2703ea77cba5fccd3bdffa /dom/bindings/Codegen.py
parent1530f48c27fb13d7cbd2708c9f0fcf2dabc6ed6a (diff)
parentab6242a93b849b0a3c7525b16bc01dd3172fc167 (diff)
downloadUXP-202296d02aa99afa90581333ab059c050b9c3ade.tar
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.gz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.lz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.tar.xz
UXP-202296d02aa99afa90581333ab059c050b9c3ade.zip
Pull Basilisk-release forward.
Diffstat (limited to 'dom/bindings/Codegen.py')
-rw-r--r--dom/bindings/Codegen.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py
index 74acb5918..d7d700a96 100644
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -2390,11 +2390,10 @@ class MethodDefiner(PropertyDefiner):
# Synthesize our valueOf method
self.regular.append({
"name": 'valueOf',
- "nativeName": "UnforgeableValueOf",
+ "selfHostedName": "Object_valueOf",
"methodInfo": False,
"length": 0,
- "flags": "JSPROP_ENUMERATE", # readonly/permanent added
- # automatically.
+ "flags": "0", # readonly/permanent added automatically.
"condition": MemberCondition()
})
@@ -3456,19 +3455,15 @@ def InitUnforgeablePropertiesOnHolder(descriptor, properties, failureCode,
"nsContentUtils::ThreadsafeIsCallerChrome()"))
if descriptor.interface.getExtendedAttribute("Unforgeable"):
- # We do our undefined toJSON and toPrimitive here, not as a regular
- # property because we don't have a concept of value props anywhere in
- # IDL.
+ # We do our undefined toPrimitive here, not as a regular property
+ # because we don't have a concept of value props anywhere in IDL.
unforgeables.append(CGGeneric(fill(
"""
JS::RootedId toPrimitive(aCx,
SYMBOL_TO_JSID(JS::GetWellKnownSymbol(aCx, JS::SymbolCode::toPrimitive)));
if (!JS_DefinePropertyById(aCx, ${holderName}, toPrimitive,
JS::UndefinedHandleValue,
- JSPROP_READONLY | JSPROP_PERMANENT) ||
- !JS_DefineProperty(aCx, ${holderName}, "toJSON",
- JS::UndefinedHandleValue,
- JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT)) {
+ JSPROP_READONLY | JSPROP_PERMANENT)) {
$*{failureCode}
}
""",