Backed out changeset d14511be496e (bug 1294013) for Windows build bustage
authorIris Hsiao <ihsiao@mozilla.com>
Wed, 17 Aug 2016 18:50:18 +0800
changeset 309851 97f275254cecdc54d07c68a8d0be263d90dbaa2c
parent 309850 272a2ab0d60d40bcf6751c36dd823651cfda023d
child 309852 827512670fd6b9e5ae5724acf7d8c406e6dfde0d
push id20333
push userkwierso@gmail.com
push dateThu, 18 Aug 2016 00:26:40 +0000
treeherderfx-team@11c94ec980d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1294013
milestone51.0a1
backs outd14511be496e4ddc23f763ff4df467c9d34c891f
Backed out changeset d14511be496e (bug 1294013) for Windows build bustage
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -1562,35 +1562,36 @@ Debugger::processResumptionValue(Maybe<A
     }
 
     return true;
 }
 
 JSTrapStatus
 Debugger::parseResumptionValueHelper(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
                                      const Maybe<HandleValue>& 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<AutoCompartment>& 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);
     Maybe<HandleValue> thisArg;
     if (frame.debuggerNeedsCheckPrimitiveReturn()) {
         bool success;
         {
             AutoCompartment ac2(cx, frame.scopeChain());
@@ -1598,30 +1599,31 @@ Debugger::parseResumptionValue(Maybe<Aut
         }
         if (!success || !cx->compartment()->wrap(cx, &rootThis)) {
             ac.reset();
             return JSTRAP_ERROR;
         }
         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<AutoCompartment>& 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);
     Maybe<HandleValue> thisArg;
     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
 CallMethodIfPresent(JSContext* cx, HandleObject obj, const char* name, size_t argc, Value* argv,
                     MutableHandleValue rval)
 {
     rval.setUndefined();
     JSAtom* atom = Atomize(cx, name, strlen(name));
@@ -1896,17 +1898,17 @@ Debugger::onTrap(JSContext* cx, MutableH
 
             RootedValue scriptFrame(cx);
             if (!dbg->getScriptFrame(cx, iter, &scriptFrame))
                 return dbg->handleUncaughtException(ac, false);
             RootedValue rv(cx);
             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);
+                                                        iter.pc(), vp, true);
             if (st != JSTRAP_CONTINUE)
                 return st;
 
             /* Calling JS code invalidates site. Reload it. */
             site = script->getBreakpointSite(pc);
         }
     }
 
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -543,32 +543,33 @@ class Debugger : private mozilla::Linked
      *         or JSTRAP_THROW. The interpreter will force the current frame to
      *         return or throw an exception.
      *     null - Return JSTRAP_ERROR to terminate the debuggee with an
      *         uncatchable error.
      *     anything else - Make a new TypeError the pending exception and
      *         return handleUncaughtException(ac, vp, callHook).
      */
     JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& 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
      * initialized, because the initialzation happens in the function's
      * prologue. To combat this, we pass the this for the primitive return
      * check directly. When bug 1249193 is fixed, this overload should be
      * removed.
      */
     JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
                                       const Value& thisVForCheck, AbstractFramePtr frame,
-                                      MutableHandleValue vp);
+                                      MutableHandleValue vp, bool callHook = true);
 
     JSTrapStatus parseResumptionValueHelper(mozilla::Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
                                             const mozilla::Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
-                                            MutableHandleValue vp);
+                                            MutableHandleValue vp, bool callHook);
 
     bool processResumptionValue(mozilla::Maybe<AutoCompartment>& ac, AbstractFramePtr frame,
                                 const mozilla::Maybe<HandleValue>& maybeThis, HandleValue rval,
                                 JSTrapStatus* statusp, MutableHandleValue vp);
 
     GlobalObject* unwrapDebuggeeArgument(JSContext* cx, const Value& v);
 
     static void traceObject(JSTracer* trc, JSObject* obj);