зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 7de39a071ca6 (bug 981167) for Test Bustage on a CLOSED TREE
This commit is contained in:
Родитель
426b8737e5
Коммит
3d69a1c238
|
@ -450,11 +450,8 @@ Debugger::fromChildJSObject(JSObject *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Debugger::getScriptFrameWithIter(JSContext *cx, AbstractFramePtr frame,
|
Debugger::getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp)
|
||||||
const ScriptFrameIter *maybeIter, MutableHandleValue vp)
|
|
||||||
{
|
{
|
||||||
MOZ_ASSERT_IF(maybeIter, maybeIter->abstractFramePtr() == frame);
|
|
||||||
|
|
||||||
FrameMap::AddPtr p = frames.lookupForAdd(frame);
|
FrameMap::AddPtr p = frames.lookupForAdd(frame);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
/* Create and populate the Debugger.Frame object. */
|
/* Create and populate the Debugger.Frame object. */
|
||||||
|
@ -464,17 +461,7 @@ Debugger::getScriptFrameWithIter(JSContext *cx, AbstractFramePtr frame,
|
||||||
if (!frameobj)
|
if (!frameobj)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Eagerly copy ScriptFrameIter data if we've already walked the
|
frameobj->setPrivate(frame.raw());
|
||||||
// stack.
|
|
||||||
if (maybeIter) {
|
|
||||||
AbstractFramePtr data = maybeIter->copyDataAsAbstractFramePtr();
|
|
||||||
if (!data)
|
|
||||||
return false;
|
|
||||||
frameobj->setPrivate(data.raw());
|
|
||||||
} else {
|
|
||||||
frameobj->setPrivate(frame.raw());
|
|
||||||
}
|
|
||||||
|
|
||||||
frameobj->setReservedSlot(JSSLOT_DEBUGFRAME_OWNER, ObjectValue(*object));
|
frameobj->setReservedSlot(JSSLOT_DEBUGFRAME_OWNER, ObjectValue(*object));
|
||||||
|
|
||||||
if (!frames.add(p, frame, frameobj)) {
|
if (!frames.add(p, frame, frameobj)) {
|
||||||
|
|
|
@ -370,13 +370,6 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
|
||||||
*/
|
*/
|
||||||
void fireNewScript(JSContext *cx, HandleScript script);
|
void fireNewScript(JSContext *cx, HandleScript script);
|
||||||
|
|
||||||
/*
|
|
||||||
* Gets a Debugger.Frame object. If maybeIter is non-null, we eagerly copy
|
|
||||||
* its data if we need to make a new Debugger.Frame.
|
|
||||||
*/
|
|
||||||
bool getScriptFrameWithIter(JSContext *cx, AbstractFramePtr frame,
|
|
||||||
const ScriptFrameIter *maybeIter, MutableHandleValue vp);
|
|
||||||
|
|
||||||
inline Breakpoint *firstBreakpoint() const;
|
inline Breakpoint *firstBreakpoint() const;
|
||||||
|
|
||||||
static inline Debugger *fromOnNewGlobalObjectWatchersLink(JSCList *link);
|
static inline Debugger *fromOnNewGlobalObjectWatchersLink(JSCList *link);
|
||||||
|
@ -490,9 +483,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
|
||||||
* Use this if you have already access to a frame pointer without having
|
* Use this if you have already access to a frame pointer without having
|
||||||
* to incur the cost of walking the stack.
|
* to incur the cost of walking the stack.
|
||||||
*/
|
*/
|
||||||
bool getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp) {
|
bool getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp);
|
||||||
return getScriptFrameWithIter(cx, frame, nullptr, vp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Store the Debugger.Frame object for iter in *vp. Eagerly copies a
|
* Store the Debugger.Frame object for iter in *vp. Eagerly copies a
|
||||||
|
@ -503,7 +494,11 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
|
||||||
* paid.
|
* paid.
|
||||||
*/
|
*/
|
||||||
bool getScriptFrame(JSContext *cx, const ScriptFrameIter &iter, MutableHandleValue vp) {
|
bool getScriptFrame(JSContext *cx, const ScriptFrameIter &iter, MutableHandleValue vp) {
|
||||||
return getScriptFrameWithIter(cx, iter.abstractFramePtr(), &iter, vp);
|
AbstractFramePtr data = iter.copyDataAsAbstractFramePtr();
|
||||||
|
if (!data || !getScriptFrame(cx, iter.abstractFramePtr(), vp))
|
||||||
|
return false;
|
||||||
|
vp.toObject().setPrivate(data.raw());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче