Backed out changeset 7de39a071ca6 (bug 981167) for Test Bustage on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-03-10 10:41:31 +01:00
parent f30bd3b5ac
commit 80de55b990
2 changed files with 8 additions and 26 deletions

View File

@ -450,11 +450,8 @@ Debugger::fromChildJSObject(JSObject *obj)
}
bool
Debugger::getScriptFrameWithIter(JSContext *cx, AbstractFramePtr frame,
const ScriptFrameIter *maybeIter, MutableHandleValue vp)
Debugger::getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp)
{
MOZ_ASSERT_IF(maybeIter, maybeIter->abstractFramePtr() == frame);
FrameMap::AddPtr p = frames.lookupForAdd(frame);
if (!p) {
/* Create and populate the Debugger.Frame object. */
@ -464,17 +461,7 @@ Debugger::getScriptFrameWithIter(JSContext *cx, AbstractFramePtr frame,
if (!frameobj)
return false;
// Eagerly copy ScriptFrameIter data if we've already walked the
// stack.
if (maybeIter) {
AbstractFramePtr data = maybeIter->copyDataAsAbstractFramePtr();
if (!data)
return false;
frameobj->setPrivate(data.raw());
} else {
frameobj->setPrivate(frame.raw());
}
frameobj->setPrivate(frame.raw());
frameobj->setReservedSlot(JSSLOT_DEBUGFRAME_OWNER, ObjectValue(*object));
if (!frames.add(p, frame, frameobj)) {

View File

@ -370,13 +370,6 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
*/
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;
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
* to incur the cost of walking the stack.
*/
bool getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp) {
return getScriptFrameWithIter(cx, frame, nullptr, vp);
}
bool getScriptFrame(JSContext *cx, AbstractFramePtr frame, MutableHandleValue vp);
/*
* Store the Debugger.Frame object for iter in *vp. Eagerly copies a
@ -503,7 +494,11 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* paid.
*/
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;
}
/*