Bug 981167 - Followup: rm dead perThread_ member of ScriptFrameIter::Data. (r=me)
authorShu-yu Guo <shu@rfrn.org>
Mon, 10 Mar 2014 19:17:24 -0700
changeset 191123 cafc246cc62c3cdbe5a6edc9431649d8e29f38e8
parent 191122 7265b36257e5c0bee62886ef2bcb917862aad2d2
child 191124 73d02445dc1cbee93fdb4cd153c29ee466bc1d55
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs981167
milestone30.0a1
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
Bug 981167 - Followup: rm dead perThread_ member of ScriptFrameIter::Data. (r=me)
js/src/vm/Stack.cpp
js/src/vm/Stack.h
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -621,60 +621,58 @@ FrameIter::settleOnActivation()
 
         JS_ASSERT(!data_.interpFrames_.frame()->runningInJit());
         data_.pc_ = data_.interpFrames_.pc();
         data_.state_ = INTERP;
         return;
     }
 }
 
-FrameIter::Data::Data(JSContext *cx, PerThreadData *perThread, SavedOption savedOption,
-                      ContextOption contextOption, JSPrincipals *principals)
-  : perThread_(perThread),
-    cx_(cx),
+FrameIter::Data::Data(JSContext *cx, SavedOption savedOption, ContextOption contextOption,
+                      JSPrincipals *principals)
+  : cx_(cx),
     savedOption_(savedOption),
     contextOption_(contextOption),
     principals_(principals),
     pc_(nullptr),
     interpFrames_(nullptr),
     activations_(cx->runtime())
 #ifdef JS_ION
   , ionFrames_((uint8_t *)nullptr, SequentialExecution)
 #endif
 {
 }
 
 FrameIter::Data::Data(const FrameIter::Data &other)
-  : perThread_(other.perThread_),
-    cx_(other.cx_),
+  : cx_(other.cx_),
     savedOption_(other.savedOption_),
     contextOption_(other.contextOption_),
     principals_(other.principals_),
     state_(other.state_),
     pc_(other.pc_),
     interpFrames_(other.interpFrames_),
     activations_(other.activations_)
 #ifdef JS_ION
   , ionFrames_(other.ionFrames_)
 #endif
 {
 }
 
 FrameIter::FrameIter(JSContext *cx, SavedOption savedOption)
-  : data_(cx, &cx->runtime()->mainThread, savedOption, CURRENT_CONTEXT, nullptr)
+  : data_(cx, savedOption, CURRENT_CONTEXT, nullptr)
 #ifdef JS_ION
     , ionInlineFrames_(cx, (js::jit::IonFrameIterator*) nullptr)
 #endif
 {
     settleOnActivation();
 }
 
 FrameIter::FrameIter(JSContext *cx, ContextOption contextOption,
                      SavedOption savedOption, JSPrincipals *principals)
-  : data_(cx, &cx->runtime()->mainThread, savedOption, contextOption, principals)
+  : data_(cx, savedOption, contextOption, principals)
 #ifdef JS_ION
     , ionInlineFrames_(cx, (js::jit::IonFrameIterator*) nullptr)
 #endif
 {
     settleOnActivation();
 }
 
 FrameIter::FrameIter(const FrameIter &other)
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -1484,35 +1484,34 @@ class FrameIter
     enum SavedOption { STOP_AT_SAVED, GO_THROUGH_SAVED };
     enum ContextOption { CURRENT_CONTEXT, ALL_CONTEXTS };
     enum State { DONE, INTERP, JIT, ASMJS };
 
     // Unlike ScriptFrameIter itself, ScriptFrameIter::Data can be allocated on
     // the heap, so this structure should not contain any GC things.
     struct Data
     {
-        PerThreadData * perThread_;
         JSContext *     cx_;
         SavedOption     savedOption_;
         ContextOption   contextOption_;
         JSPrincipals *  principals_;
 
         State           state_;
 
         jsbytecode *    pc_;
 
         InterpreterFrameIterator interpFrames_;
         ActivationIterator activations_;
 
 #ifdef JS_ION
         jit::IonFrameIterator ionFrames_;
 #endif
 
-        Data(JSContext *cx, PerThreadData *perThread, SavedOption savedOption,
-             ContextOption contextOption, JSPrincipals *principals);
+        Data(JSContext *cx, SavedOption savedOption, ContextOption contextOption,
+             JSPrincipals *principals);
         Data(const Data &other);
     };
 
     FrameIter(JSContext *cx, SavedOption = STOP_AT_SAVED);
     FrameIter(JSContext *cx, ContextOption, SavedOption, JSPrincipals* = nullptr);
     FrameIter(const FrameIter &iter);
     FrameIter(const Data &data);
     FrameIter(AbstractFramePtr frame);