mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 22:08:40 +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
|
|
@ -1005,15 +1005,16 @@ js::InitNumberClass(JSContext* cx, HandleObject obj)
|
|||
/* XXX must do at least once per new thread, so do it per JSContext... */
|
||||
FIX_FPU();
|
||||
|
||||
Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>());
|
||||
Handle<GlobalObject*> global = obj.as<GlobalObject>();
|
||||
|
||||
RootedObject numberProto(cx, global->createBlankPrototype(cx, &NumberObject::class_));
|
||||
RootedObject numberProto(cx, GlobalObject::createBlankPrototype(cx, global,
|
||||
&NumberObject::class_));
|
||||
if (!numberProto)
|
||||
return nullptr;
|
||||
numberProto->as<NumberObject>().setPrimitiveValue(0);
|
||||
|
||||
RootedFunction ctor(cx);
|
||||
ctor = global->createConstructor(cx, Number, cx->names().Number, 1);
|
||||
ctor = GlobalObject::createConstructor(cx, Number, cx->names().Number, 1);
|
||||
if (!ctor)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue