mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 06:18:38 +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
|
|
@ -971,9 +971,9 @@ static const JSFunctionSpec json_static_methods[] = {
|
|||
JSObject*
|
||||
js::InitJSONClass(JSContext* cx, HandleObject obj)
|
||||
{
|
||||
Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>());
|
||||
Handle<GlobalObject*> global = obj.as<GlobalObject>();
|
||||
|
||||
RootedObject proto(cx, global->getOrCreateObjectPrototype(cx));
|
||||
RootedObject proto(cx, GlobalObject::getOrCreateObjectPrototype(cx, global));
|
||||
if (!proto)
|
||||
return nullptr;
|
||||
RootedObject JSON(cx, NewObjectWithGivenProto(cx, &JSONClass, proto, SingletonObject));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue