mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-18 21:27:30 +09:00
1320408 - Part 5: Change JSObject::constructorDisplayAtom to static method.
This commit is contained in:
parent
87bfc02f09
commit
6a21912a94
4 changed files with 8 additions and 7 deletions
|
|
@ -3319,7 +3319,8 @@ GetConstructorName(JSContext* cx, unsigned argc, Value* vp)
|
|||
}
|
||||
|
||||
RootedAtom name(cx);
|
||||
if (!args[0].toObject().constructorDisplayAtom(cx, &name))
|
||||
RootedObject obj(cx, &args[0].toObject());
|
||||
if (!JSObject::constructorDisplayAtom(cx, obj, &name))
|
||||
return false;
|
||||
|
||||
if (name) {
|
||||
|
|
|
|||
|
|
@ -3849,11 +3849,10 @@ displayAtomFromObjectGroup(ObjectGroup& group)
|
|||
return script->function()->displayAtom();
|
||||
}
|
||||
|
||||
bool
|
||||
JSObject::constructorDisplayAtom(JSContext* cx, js::MutableHandleAtom name)
|
||||
/* static */ bool
|
||||
JSObject::constructorDisplayAtom(JSContext* cx, js::HandleObject obj, js::MutableHandleAtom name)
|
||||
{
|
||||
RootedObject self(cx, this); // Temporary change.
|
||||
ObjectGroup *g = JSObject::getGroup(cx, self);
|
||||
ObjectGroup *g = JSObject::getGroup(cx, obj);
|
||||
if (!g)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,8 @@ class JSObject : public js::gc::Cell
|
|||
* If this object was instantiated with `new Ctor`, return the constructor's
|
||||
* display atom. Otherwise, return nullptr.
|
||||
*/
|
||||
bool constructorDisplayAtom(JSContext* cx, js::MutableHandleAtom name);
|
||||
static bool constructorDisplayAtom(JSContext* cx, js::HandleObject obj,
|
||||
js::MutableHandleAtom name);
|
||||
|
||||
/*
|
||||
* The same as constructorDisplayAtom above, however if this object has a
|
||||
|
|
|
|||
|
|
@ -2234,7 +2234,7 @@ Debugger::appendAllocationSite(JSContext* cx, HandleObject obj, HandleSavedFrame
|
|||
RootedAtom ctorName(cx);
|
||||
{
|
||||
AutoCompartment ac(cx, obj);
|
||||
if (!obj->constructorDisplayAtom(cx, &ctorName))
|
||||
if (!JSObject::constructorDisplayAtom(cx, obj, &ctorName))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue