Bug 1294013 - Remove callHook from parseResumptionValue(Helper). r=jimb

This commit is contained in:
Eddy Bruel 2016-08-17 11:45:59 +02:00
Родитель 162cd6ab9b
Коммит 7ec3a9741b
2 изменённых файлов: 11 добавлений и 14 удалений

Просмотреть файл

@ -1567,26 +1567,25 @@ Debugger::processResumptionValue(Maybe<AutoCompartment>& ac, AbstractFramePtr fr
JSTrapStatus
Debugger::parseResumptionValueHelper(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp, bool callHook)
MutableHandleValue vp)
{
vp.setUndefined();
if (!ok)
return handleUncaughtException(ac, vp, callHook, thisVForCheck, frame);
return handleUncaughtException(ac, vp, true, thisVForCheck, frame);
JSContext* cx = ac->context()->asJSContext();
RootedValue rvRoot(cx, rv);
JSTrapStatus status = JSTRAP_CONTINUE;
RootedValue v(cx);
if (!processResumptionValue(ac, frame, thisVForCheck, rvRoot, &status, &v))
return handleUncaughtException(ac, vp, callHook, thisVForCheck, frame);
return handleUncaughtException(ac, vp, true, thisVForCheck, frame);
vp.set(v);
return status;
}
JSTrapStatus
Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp,
bool callHook)
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp)
{
JSContext* cx = ac->context()->asJSContext();
RootedValue rootThis(cx);
@ -1604,13 +1603,12 @@ Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value&
MOZ_ASSERT_IF(rootThis.isMagic(), rootThis.isMagic(JS_UNINITIALIZED_LEXICAL));
thisArg.emplace(HandleValue(rootThis));
}
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp, callHook);
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp);
}
JSTrapStatus
Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp,
bool callHook)
const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp)
{
JSContext* cx = ac->context()->asJSContext();
RootedValue rootThis(cx, thisV);
@ -1618,7 +1616,7 @@ Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value&
if (frame.debuggerNeedsCheckPrimitiveReturn())
thisArg.emplace(rootThis);
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp, callHook);
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp);
}
static bool
@ -1903,7 +1901,7 @@ Debugger::onTrap(JSContext* cx, MutableHandleValue vp)
Rooted<JSObject*> handler(cx, bp->handler);
bool ok = CallMethodIfPresent(cx, handler, "hit", 1, scriptFrame.address(), &rv);
JSTrapStatus st = dbg->parseResumptionValue(ac, ok, rv, iter.abstractFramePtr(),
iter.pc(), vp, true);
iter.pc(), vp);
if (st != JSTRAP_CONTINUE)
return st;

Просмотреть файл

@ -548,8 +548,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* return handleUncaughtException(ac, vp, callHook).
*/
JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp,
bool callHook = true);
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp);
/*
* When we run the onEnterFrame hook, the |this| slot hasn't been fully
@ -560,11 +559,11 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
*/
JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
const Value& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp, bool callHook = true);
MutableHandleValue vp);
JSTrapStatus parseResumptionValueHelper(mozilla::Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const mozilla::Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp, bool callHook);
MutableHandleValue vp);
bool processResumptionValue(mozilla::Maybe<AutoCompartment>& ac, AbstractFramePtr frame,
const mozilla::Maybe<HandleValue>& maybeThis, HandleValue rval,