From ccea2b090583f1456cc4f48125561883386bd99d Mon Sep 17 00:00:00 2001 From: Iris Hsiao Date: Wed, 17 Aug 2016 18:50:18 +0800 Subject: [PATCH] Backed out changeset d14511be496e (bug 1294013) for Windows build bustage --- js/src/vm/Debugger.cpp | 18 ++++++++++-------- js/src/vm/Debugger.h | 7 ++++--- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 2747387c0178..c785454147c9 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -1567,25 +1567,26 @@ Debugger::processResumptionValue(Maybe& ac, AbstractFramePtr fr JSTrapStatus Debugger::parseResumptionValueHelper(Maybe& ac, bool ok, const Value& rv, const Maybe& thisVForCheck, AbstractFramePtr frame, - MutableHandleValue vp) + MutableHandleValue vp, bool callHook) { vp.setUndefined(); if (!ok) - return handleUncaughtException(ac, vp, true, thisVForCheck, frame); + return handleUncaughtException(ac, vp, callHook, 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, true, thisVForCheck, frame); + return handleUncaughtException(ac, vp, callHook, thisVForCheck, frame); vp.set(v); return status; } JSTrapStatus Debugger::parseResumptionValue(Maybe& ac, bool ok, const Value& rv, - AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp) + AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp, + bool callHook) { JSContext* cx = ac->context()->asJSContext(); RootedValue rootThis(cx); @@ -1603,12 +1604,13 @@ Debugger::parseResumptionValue(Maybe& 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); + return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp, callHook); } JSTrapStatus Debugger::parseResumptionValue(Maybe& ac, bool ok, const Value& rv, - const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp) + const Value& thisV, AbstractFramePtr frame, MutableHandleValue vp, + bool callHook) { JSContext* cx = ac->context()->asJSContext(); RootedValue rootThis(cx, thisV); @@ -1616,7 +1618,7 @@ Debugger::parseResumptionValue(Maybe& ac, bool ok, const Value& if (frame.debuggerNeedsCheckPrimitiveReturn()) thisArg.emplace(rootThis); - return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp); + return parseResumptionValueHelper(ac, ok, rv, thisArg, frame, vp, callHook); } static bool @@ -1901,7 +1903,7 @@ Debugger::onTrap(JSContext* cx, MutableHandleValue vp) Rooted 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); + iter.pc(), vp, true); if (st != JSTRAP_CONTINUE) return st; diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h index d2087a6c2c1e..1329e66e2546 100644 --- a/js/src/vm/Debugger.h +++ b/js/src/vm/Debugger.h @@ -548,7 +548,8 @@ class Debugger : private mozilla::LinkedListElement * return handleUncaughtException(ac, vp, callHook). */ JSTrapStatus parseResumptionValue(mozilla::Maybe& ac, bool OK, const Value& rv, - AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp); + AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp, + bool callHook = true); /* * When we run the onEnterFrame hook, the |this| slot hasn't been fully @@ -559,11 +560,11 @@ class Debugger : private mozilla::LinkedListElement */ JSTrapStatus parseResumptionValue(mozilla::Maybe& ac, bool OK, const Value& rv, const Value& thisVForCheck, AbstractFramePtr frame, - MutableHandleValue vp); + MutableHandleValue vp, bool callHook = true); JSTrapStatus parseResumptionValueHelper(mozilla::Maybe& ac, bool ok, const Value& rv, const mozilla::Maybe& thisVForCheck, AbstractFramePtr frame, - MutableHandleValue vp); + MutableHandleValue vp, bool callHook); bool processResumptionValue(mozilla::Maybe& ac, AbstractFramePtr frame, const mozilla::Maybe& maybeThis, HandleValue rval,