Backed out changeset b93deff3205a (bug 1271650)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 05 Jul 2016 17:13:57 +0200
changeset 303709 7fbd728b1b01806d25fdea9c8dbb91fa7ef49b12
parent 303708 2c7c2bbd7101fc24667f6db81858b07818388014
child 303710 a7a0676a43f2bb8b0693591ab75cd9cad36edbf1
push id79146
push userarchaeopteryx@coole-files.de
push dateTue, 05 Jul 2016 15:15:04 +0000
treeherdermozilla-inbound@a706323c0073 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1271650
milestone50.0a1
backs outb93deff3205abe375aec934dbde012adfefedb82
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 b93deff3205a (bug 1271650)
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -7050,48 +7050,16 @@ DebuggerFrame::getCallee(JSContext* cx, 
     }
 
     Debugger* dbg = frame->owner();
 
     RootedObject callee(cx, referent.callee());
     return dbg->wrapDebuggeeObject(cx, callee, result);
 }
 
-/* static */ bool
-DebuggerFrame::getIsConstructing(JSContext* cx, Handle<DebuggerFrame*> frame, bool& result)
-{
-    Maybe<ScriptFrameIter> maybeIter;
-    if (!DebuggerFrame::getScriptFrameIter(cx, frame, maybeIter))
-        return false;
-    ScriptFrameIter& iter = *maybeIter;
-
-    result = iter.isFunctionFrame() && iter.isConstructing();
-    return true;
-}
-
-/* static */ bool
-DebuggerFrame::getScriptFrameIter(JSContext* cx, Handle<DebuggerFrame*> frame,
-                                  Maybe<ScriptFrameIter>& result)
-{
-    AbstractFramePtr referent = frame->referent();
-    if (referent.isScriptFrameIterData()) {
-        result.emplace(*reinterpret_cast<ScriptFrameIter::Data*>(referent.raw()));
-    } else {
-        result.emplace(cx, ScriptFrameIter::IGNORE_DEBUGGER_EVAL_PREV_LINK);
-        ScriptFrameIter& iter = *result;
-        while (!iter.hasUsableAbstractFramePtr() || iter.abstractFramePtr() != referent)
-            ++iter;
-        AbstractFramePtr data = iter.copyDataAsAbstractFramePtr();
-        if (!data)
-            return false;
-        frame->setPrivate(data.raw());
-    }
-    return true;
-}
-
 static void
 UpdateFrameIterPc(FrameIter& iter)
 {
     if (iter.abstractFramePtr().isRematerializedFrame()) {
 #ifdef DEBUG
         // Rematerialized frames don't need their pc updated. The reason we
         // need to update pc is because we might get the same Debugger.Frame
         // object for multiple re-entries into debugger code from debuggee
@@ -7326,26 +7294,21 @@ DebuggerFrame::calleeGetter(JSContext* c
 static bool
 DebuggerFrame_getGenerator(JSContext* cx, unsigned argc, Value* vp)
 {
     THIS_FRAME(cx, argc, vp, "get generator", args, thisobj, frame);
     args.rval().setBoolean(frame.script()->isGenerator());
     return true;
 }
 
-/* static */ bool
-DebuggerFrame::constructingGetter(JSContext* cx, unsigned argc, Value* vp)
-{
-    THIS_DEBUGGER_FRAME(cx, argc, vp, "get callee", args, frame);
-
-    bool result;
-    if (!DebuggerFrame::getIsConstructing(cx, frame, result))
-        return false;
-
-    args.rval().setBoolean(result);
+static bool
+DebuggerFrame_getConstructing(JSContext* cx, unsigned argc, Value* vp)
+{
+    THIS_FRAME_ITER(cx, argc, vp, "get constructing", args, thisobj, _, iter);
+    args.rval().setBoolean(iter.isFunctionFrame() && iter.isConstructing());
     return true;
 }
 
 static bool
 DebuggerFrame_getThis(JSContext* cx, unsigned argc, Value* vp)
 {
     THIS_FRAME_ITER(cx, argc, vp, "get this", args, thisobj, _, iter);
     RootedValue thisv(cx);
@@ -7850,17 +7813,17 @@ DebuggerFrame::construct(JSContext* cx, 
     JS_ReportErrorNumber(cx, GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
                          "Debugger.Frame");
     return false;
 }
 
 const JSPropertySpec DebuggerFrame::properties_[] = {
     JS_PSG("arguments", DebuggerFrame_getArguments, 0),
     JS_PSG("callee", DebuggerFrame::calleeGetter, 0),
-    JS_PSG("constructing", DebuggerFrame::constructingGetter, 0),
+    JS_PSG("constructing", DebuggerFrame_getConstructing, 0),
     JS_PSG("environment", DebuggerFrame_getEnvironment, 0),
     JS_PSG("generator", DebuggerFrame_getGenerator, 0),
     JS_PSG("live", DebuggerFrame_getLive, 0),
     JS_PSG("offset", DebuggerFrame_getOffset, 0),
     JS_PSG("older", DebuggerFrame_getOlder, 0),
     JS_PSG("script", DebuggerFrame_getScript, 0),
     JS_PSG("this", DebuggerFrame_getThis, 0),
     JS_PSG("type", DebuggerFrame_getType, 0),
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -1144,32 +1144,26 @@ class DebuggerFrame : public NativeObjec
     static NativeObject* initClass(JSContext* cx, HandleObject dbgCtor, HandleObject objProto);
     static DebuggerFrame* create(JSContext* cx, HandleObject proto, AbstractFramePtr referent,
                                  const ScriptFrameIter* maybeIter, HandleNativeObject debugger);
     static DebuggerFrame* checkThis(JSContext* cx, const CallArgs& args, const char* fnname,
                                     bool checkLive);
 
     static MOZ_MUST_USE bool getCallee(JSContext* cx, Handle<DebuggerFrame*> frame,
                                        MutableHandle<DebuggerObject*> result);
-    static MOZ_MUST_USE bool getIsConstructing(JSContext* cx, Handle<DebuggerFrame*> frame,
-                                               bool& result);
 
   private:
     static const ClassOps classOps_;
 
     static const JSPropertySpec properties_[];
     static const JSFunctionSpec methods_[];
 
-    static MOZ_MUST_USE bool getScriptFrameIter(JSContext* cx, Handle<DebuggerFrame*> frame,
-                                                mozilla::Maybe<ScriptFrameIter>& result);
-
     static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
 
     static MOZ_MUST_USE bool calleeGetter(JSContext* cx, unsigned argc, Value* vp);
-    static MOZ_MUST_USE bool constructingGetter(JSContext* cx, unsigned argc, Value* vp);
 
     AbstractFramePtr referent() const;
     Debugger* owner() const;
 };
 
 class DebuggerObject : public NativeObject
 {
   public: