Bug 1294013 - Rename parseResumptionValue to processHandlerResult. r=jimb

This commit is contained in:
Eddy Bruel 2016-08-22 15:54:32 +02:00
Родитель cc481ebca7
Коммит 1b409bc7be
2 изменённых файлов: 14 добавлений и 14 удалений

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

@ -920,7 +920,7 @@ Debugger::slowPathOnLeaveFrame(JSContext* cx, AbstractFramePtr frame, jsbytecode
RootedValue rval(cx); RootedValue rval(cx);
bool hookOk = js::Call(cx, handler, frameobj, completion, &rval); bool hookOk = js::Call(cx, handler, frameobj, completion, &rval);
RootedValue nextValue(cx); RootedValue nextValue(cx);
JSTrapStatus nextStatus = dbg->parseResumptionValue(ac, hookOk, rval, JSTrapStatus nextStatus = dbg->processHandlerResult(ac, hookOk, rval,
frame, pc, &nextValue); frame, pc, &nextValue);
/* /*
@ -1571,7 +1571,7 @@ Debugger::processResumptionValue(Maybe<AutoCompartment>& ac, AbstractFramePtr fr
} }
JSTrapStatus JSTrapStatus
Debugger::parseResumptionValueHelper(Maybe<AutoCompartment>& ac, bool ok, const Value& rv, Debugger::processHandlerResultHelper(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame, const Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp) MutableHandleValue vp)
{ {
@ -1589,7 +1589,7 @@ Debugger::parseResumptionValueHelper(Maybe<AutoCompartment>& ac, bool ok, const
} }
JSTrapStatus JSTrapStatus
Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value& rv, Debugger::processHandlerResult(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp) AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp)
{ {
JSContext* cx = ac->context()->asJSContext(); JSContext* cx = ac->context()->asJSContext();
@ -1608,11 +1608,11 @@ Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value&
MOZ_ASSERT_IF(rootThis.isMagic(), rootThis.isMagic(JS_UNINITIALIZED_LEXICAL)); MOZ_ASSERT_IF(rootThis.isMagic(), rootThis.isMagic(JS_UNINITIALIZED_LEXICAL));
thisArg.emplace(HandleValue(rootThis)); thisArg.emplace(HandleValue(rootThis));
} }
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp); return processHandlerResultHelper(ac, ok, rv, thisArg, frame, vp);
} }
JSTrapStatus JSTrapStatus
Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value& rv, Debugger::processHandlerResult(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp) const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp)
{ {
JSContext* cx = ac->context()->asJSContext(); JSContext* cx = ac->context()->asJSContext();
@ -1621,7 +1621,7 @@ Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value&
if (frame.debuggerNeedsCheckPrimitiveReturn()) if (frame.debuggerNeedsCheckPrimitiveReturn())
thisArg.emplace(rootThis); thisArg.emplace(rootThis);
return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp); return processHandlerResultHelper(ac, ok, rv, thisArg, frame, vp);
} }
static bool static bool
@ -1670,7 +1670,7 @@ Debugger::fireDebuggerStatement(JSContext* cx, MutableHandleValue vp)
RootedValue fval(cx, ObjectValue(*hook)); RootedValue fval(cx, ObjectValue(*hook));
RootedValue rv(cx); RootedValue rv(cx);
bool ok = js::Call(cx, fval, object, scriptFrame, &rv); bool ok = js::Call(cx, fval, object, scriptFrame, &rv);
return parseResumptionValue(ac, ok, rv, iter.abstractFramePtr(), iter.pc(), vp); return processHandlerResult(ac, ok, rv, iter.abstractFramePtr(), iter.pc(), vp);
} }
JSTrapStatus JSTrapStatus
@ -1698,7 +1698,7 @@ Debugger::fireExceptionUnwind(JSContext* cx, MutableHandleValue vp)
RootedValue fval(cx, ObjectValue(*hook)); RootedValue fval(cx, ObjectValue(*hook));
RootedValue rv(cx); RootedValue rv(cx);
bool ok = js::Call(cx, fval, object, scriptFrame, wrappedExc, &rv); bool ok = js::Call(cx, fval, object, scriptFrame, wrappedExc, &rv);
JSTrapStatus st = parseResumptionValue(ac, ok, rv, iter.abstractFramePtr(), iter.pc(), vp); JSTrapStatus st = processHandlerResult(ac, ok, rv, iter.abstractFramePtr(), iter.pc(), vp);
if (st == JSTRAP_CONTINUE) if (st == JSTRAP_CONTINUE)
cx->setPendingException(exc); cx->setPendingException(exc);
return st; return st;
@ -1722,7 +1722,7 @@ Debugger::fireEnterFrame(JSContext* cx, AbstractFramePtr frame, MutableHandleVal
RootedValue rv(cx); RootedValue rv(cx);
bool ok = js::Call(cx, fval, object, scriptFrame, &rv); bool ok = js::Call(cx, fval, object, scriptFrame, &rv);
return parseResumptionValue(ac, ok, rv, MagicValue(JS_UNINITIALIZED_LEXICAL), frame, vp); return processHandlerResult(ac, ok, rv, MagicValue(JS_UNINITIALIZED_LEXICAL), frame, vp);
} }
void void
@ -1905,7 +1905,7 @@ Debugger::onTrap(JSContext* cx, MutableHandleValue vp)
RootedValue rv(cx); RootedValue rv(cx);
Rooted<JSObject*> handler(cx, bp->handler); Rooted<JSObject*> handler(cx, bp->handler);
bool ok = CallMethodIfPresent(cx, handler, "hit", 1, scriptFrame.address(), &rv); bool ok = CallMethodIfPresent(cx, handler, "hit", 1, scriptFrame.address(), &rv);
JSTrapStatus st = dbg->parseResumptionValue(ac, ok, rv, iter.abstractFramePtr(), JSTrapStatus st = dbg->processHandlerResult(ac, ok, rv, iter.abstractFramePtr(),
iter.pc(), vp); iter.pc(), vp);
if (st != JSTRAP_CONTINUE) if (st != JSTRAP_CONTINUE)
return st; return st;
@ -1994,7 +1994,7 @@ Debugger::onSingleStep(JSContext* cx, MutableHandleValue vp)
RootedValue fval(cx, frame->getReservedSlot(JSSLOT_DEBUGFRAME_ONSTEP_HANDLER)); RootedValue fval(cx, frame->getReservedSlot(JSSLOT_DEBUGFRAME_ONSTEP_HANDLER));
RootedValue rval(cx); RootedValue rval(cx);
bool ok = js::Call(cx, fval, frame, &rval); bool ok = js::Call(cx, fval, frame, &rval);
JSTrapStatus st = dbg->parseResumptionValue(ac, ok, rval, iter.abstractFramePtr(), JSTrapStatus st = dbg->processHandlerResult(ac, ok, rval, iter.abstractFramePtr(),
iter.pc(), vp); iter.pc(), vp);
if (st != JSTRAP_CONTINUE) if (st != JSTRAP_CONTINUE)
return st; return st;

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

@ -547,7 +547,7 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* anything else - Make a new TypeError the pending exception and * anything else - Make a new TypeError the pending exception and
* return handleUncaughtException(ac, vp, callHook). * return handleUncaughtException(ac, vp, callHook).
*/ */
JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv, JSTrapStatus processHandlerResult(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp); AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp);
/* /*
@ -557,11 +557,11 @@ class Debugger : private mozilla::LinkedListElement<Debugger>
* check directly. When bug 1249193 is fixed, this overload should be * check directly. When bug 1249193 is fixed, this overload should be
* removed. * removed.
*/ */
JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv, JSTrapStatus processHandlerResult(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
const Value& thisVForCheck, AbstractFramePtr frame, const Value& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp); MutableHandleValue vp);
JSTrapStatus parseResumptionValueHelper(mozilla::Maybe<AutoCompartment>& ac, bool ok, const Value& rv, JSTrapStatus processHandlerResultHelper(mozilla::Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
const mozilla::Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame, const mozilla::Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
MutableHandleValue vp); MutableHandleValue vp);