Backed out changeset 33283d086876 (bug 1294013)
authorIris Hsiao <ihsiao@mozilla.com>
Wed, 17 Aug 2016 18:50:29 +0800
changeset 309731 33c91255b886
parent 309730 827512670fd6
child 309732 5471793e8e65
push id80681
push userihsiao@mozilla.com
push date2016-08-17 10:53 +0000
treeherdermozilla-inbound@7e2cfb44947e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1294013
milestone51.0a1
backs out33283d086876
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 33283d086876 (bug 1294013)
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -1531,55 +1531,43 @@ CheckResumptionValue(JSContext* cx, Abst
                 ReportValueError(cx, JSMSG_BAD_DERIVED_RETURN, JSDVG_IGNORE_STACK, vp, nullptr);
                 return false;
             }
         }
     }
     return true;
 }
 
-bool
-Debugger::processResumptionValue(Maybe<AutoCompartment>& ac, AbstractFramePtr frame,
-                                 const Maybe<HandleValue>& maybeThisv, HandleValue rval,
-                                 JSTrapStatus* statusp, MutableHandleValue vp)
-{
-    JSContext* cx = ac->context()->asJSContext();
-
-    if (!ParseResumptionValue(cx, rval, statusp, vp) ||
-        !unwrapDebuggeeValue(cx, vp) ||
-        !CheckResumptionValue(cx, frame, maybeThisv, *statusp, vp))
-    {
-        return false;
-    }
-
-    ac.reset();
-    if (!cx->compartment()->wrap(cx, vp)) {
-        *statusp = JSTRAP_ERROR;
-        vp.setUndefined();
-    }
-
-    return true;
-}
-
 JSTrapStatus
 Debugger::parseResumptionValueHelper(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
                                      const Maybe<HandleValue>& thisVForCheck, AbstractFramePtr frame,
                                      MutableHandleValue vp, bool callHook)
 {
     vp.setUndefined();
     if (!ok)
         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))
+    if (!ParseResumptionValue(cx, rvRoot, &status, &v) ||
+        !unwrapDebuggeeValue(cx, &v) ||
+        !CheckResumptionValue(cx, frame, thisVForCheck, status, &v))
+    {
         return handleUncaughtException(ac, vp, callHook, thisVForCheck, frame);
+    }
+
+    ac.reset();
+    if (!cx->compartment()->wrap(cx, &v)) {
+        vp.setUndefined();
+        return JSTRAP_ERROR;
+    }
     vp.set(v);
+
     return status;
 }
 
 JSTrapStatus
 Debugger::parseResumptionValue(Maybe<AutoCompartment>& ac, bool ok, const Value& rv,
                                AbstractFramePtr frame, jsbytecode* pc, MutableHandleValue vp,
                                bool callHook)
 {
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -561,20 +561,16 @@ class Debugger : private mozilla::Linked
     JSTrapStatus parseResumptionValue(mozilla::Maybe<AutoCompartment>& ac, bool OK, const Value& rv,
                                       const Value& thisVForCheck, AbstractFramePtr frame,
                                       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, 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);
     void trace(JSTracer* trc);
     static void finalize(FreeOp* fop, JSObject* obj);
     void markCrossCompartmentEdges(JSTracer* tracer);
 
     static const ClassOps classOps_;