mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
1320408 - Part 14: Change some GlobalObject methods to static method.
This commit is contained in:
parent
b237ae6437
commit
cc8cb910dd
37 changed files with 287 additions and 259 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue