mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1271653 - DebuggerObject.global should return a DebuggerObject;r=fitzgen
This commit is contained in:
parent
de6084520f
commit
f182cfb7be
@ -8128,7 +8128,7 @@ DebuggerObject::globalGetter(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
THIS_DEBUGOBJECT(cx, argc, vp, "get global", args, object)
|
||||
|
||||
RootedObject result(cx);
|
||||
Rooted<DebuggerObject*> result(cx);
|
||||
if (!DebuggerObject::global(cx, object, &result))
|
||||
return false;
|
||||
|
||||
@ -8882,13 +8882,18 @@ DebuggerObject::className(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
DebuggerObject::global(JSContext* cx, Handle<DebuggerObject*> object, MutableHandleObject result)
|
||||
DebuggerObject::global(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
MutableHandle<DebuggerObject*> result)
|
||||
{
|
||||
RootedObject referent(cx, object->referent());
|
||||
Debugger* dbg = object->owner();
|
||||
|
||||
result.set(&referent->global());
|
||||
return dbg->wrapDebuggeeObject(cx, result);
|
||||
RootedObject global(cx, &referent->global());
|
||||
if (!dbg->wrapDebuggeeObject(cx, &global))
|
||||
return false;
|
||||
|
||||
result.set(&global->as<DebuggerObject>());
|
||||
return true;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
|
@ -1072,7 +1072,7 @@ class DebuggerObject : public NativeObject
|
||||
static MOZ_MUST_USE bool className(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
MutableHandleString result);
|
||||
static MOZ_MUST_USE bool global(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
MutableHandleObject result);
|
||||
MutableHandle<DebuggerObject*> result);
|
||||
static MOZ_MUST_USE bool name(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
MutableHandleString result);
|
||||
static MOZ_MUST_USE bool displayName(JSContext* cx, Handle<DebuggerObject*> object,
|
||||
|
Loading…
Reference in New Issue
Block a user