summaryrefslogtreecommitdiff
path: root/js/src/jsexn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsexn.cpp')
-rw-r--r--js/src/jsexn.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp
index 1e70a3890b..102e6fb34e 100644
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -512,14 +512,17 @@ ErrorObject::createProto(JSContext* cx, JSProtoKey key)
{
JSExnType type = ExnTypeFromProtoKey(key);
- if (type == JSEXN_ERR)
- return cx->global()->createBlankPrototype(cx, &ErrorObject::protoClasses[JSEXN_ERR]);
+ if (type == JSEXN_ERR) {
+ return GlobalObject::createBlankPrototype(cx, cx->global(),
+ &ErrorObject::protoClasses[JSEXN_ERR]);
+ }
RootedObject protoProto(cx, GlobalObject::getOrCreateErrorPrototype(cx, cx->global()));
if (!protoProto)
return nullptr;
- return cx->global()->createBlankPrototypeInheriting(cx, &ErrorObject::protoClasses[type],
+ return GlobalObject::createBlankPrototypeInheriting(cx, cx->global(),
+ &ErrorObject::protoClasses[type],
protoProto);
}