summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
Diffstat (limited to 'dom')
-rw-r--r--dom/bindings/BindingUtils.cpp8
-rw-r--r--dom/bindings/BindingUtils.h3
-rw-r--r--dom/bindings/Codegen.py15
3 files changed, 5 insertions, 21 deletions
diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp
index 8d2bdaac6..a26fc4422 100644
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -1184,14 +1184,6 @@ GetInterfaceImpl(JSContext* aCx, nsIInterfaceRequestor* aRequestor,
}
bool
-UnforgeableValueOf(JSContext* cx, unsigned argc, JS::Value* vp)
-{
- JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
- args.rval().set(args.thisv());
- return true;
-}
-
-bool
ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp)
{
return ThrowErrorMessage(cx, MSG_ILLEGAL_CONSTRUCTOR);
diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h
index a3ec70f47..5cab835b3 100644
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -2045,9 +2045,6 @@ GetInterface(JSContext* aCx, T* aThis, nsIJSID* aIID,
}
bool
-UnforgeableValueOf(JSContext* cx, unsigned argc, JS::Value* vp);
-
-bool
ThrowingConstructor(JSContext* cx, unsigned argc, JS::Value* vp);
bool
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}
}
""",