Backed out changeset 39da44265946 (bug 1263595) for build bustage a=backout CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 16 Sep 2016 14:19:22 -0700
changeset 355603 4fff9d20cd9d55ca651472f363a2c34676d46938
parent 355602 39da442659460a742f873ab42be26f45b12da399
child 355604 0abb41799b5b9a232485fd240b270d879504e775
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1263595
milestone51.0a1
backs out39da442659460a742f873ab42be26f45b12da399
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 39da44265946 (bug 1263595) for build bustage a=backout CLOSED TREE
dom/indexedDB/ActorsParent.cpp
js/src/jit/ExecutableAllocatorWin.cpp
mozglue/misc/StackWalk.cpp
mozglue/misc/StackWalk_windows.h
mozglue/misc/moz.build
netwerk/base/ProxyAutoConfig.cpp
tools/profiler/core/ThreadInfo.cpp
tools/profiler/core/ThreadInfo.h
tools/profiler/core/ThreadProfile.h
tools/profiler/core/platform-win32.cc
xpcom/base/CycleCollectedJSContext.cpp
xpcom/threads/HangMonitor.cpp
xpcom/threads/LazyIdleThread.cpp
xpcom/threads/nsIThread.idl
xpcom/threads/nsThread.cpp
xpcom/threads/nsThread.h
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -24174,20 +24174,16 @@ NormalJSContext::Init()
 {
   MOZ_ASSERT(!IsOnBackgroundThread());
 
   mContext = JS_NewContext(kContextHeapSize);
   if (NS_WARN_IF(!mContext)) {
     return false;
   }
 
-  // Let everyone know that we might be able to call JS. This alerts the
-  // profiler about certain possible deadlocks.
-  NS_GetCurrentThread()->SetCanInvokeJS(true);
-
   // Not setting this will cause JS_CHECK_RECURSION to report false positives.
   JS_SetNativeStackQuota(mContext, 128 * sizeof(size_t) * 1024);
 
   if (NS_WARN_IF(!JS::InitSelfHostedCode(mContext))) {
     return false;
   }
 
   JSAutoRequest ar(mContext);
--- a/js/src/jit/ExecutableAllocatorWin.cpp
+++ b/js/src/jit/ExecutableAllocatorWin.cpp
@@ -20,20 +20,16 @@
  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifdef MOZ_STACKWALKING
-#include "mozilla/StackWalk_windows.h"
-#endif
-
 #include "mozilla/WindowsVersion.h"
 
 #include "jsfriendapi.h"
 #include "jsmath.h"
 #include "jswin.h"
 
 #include "jit/ExecutableAllocator.h"
 
@@ -164,47 +160,24 @@ RegisterExecutableMemory(void* p, size_t
 
     // jmp rax
     r->thunk[10] = 0xff;
     r->thunk[11] = 0xe0;
 
     if (!VirtualProtect(p, pageSize, PAGE_EXECUTE_READ, &oldProtect))
         return false;
 
-    // XXX NB: The profiler believes this function is only called from the main
-    // thread. If that ever becomes untrue, SPS must be updated immediately.
-#ifdef MOZ_STACKWALKING
-    AcquireStackWalkWorkaroundLock();
-#endif
-
-    bool success = RtlAddFunctionTable(&r->runtimeFunction, 1, reinterpret_cast<DWORD64>(p));
-
-#ifdef MOZ_STACKWALKING
-    ReleaseStackWalkWorkaroundLock();
-#endif
-
-    return success;
+    return RtlAddFunctionTable(&r->runtimeFunction, 1, reinterpret_cast<DWORD64>(p));
 }
 
 static void
 UnregisterExecutableMemory(void* p, size_t bytes, size_t pageSize)
 {
     ExceptionHandlerRecord* r = reinterpret_cast<ExceptionHandlerRecord*>(p);
-
-    // XXX NB: The profiler believes this function is only called from the main
-    // thread. If that ever becomes untrue, SPS must be updated immediately.
-#ifdef MOZ_STACKWALKING
-    AcquireStackWalkWorkaroundLock();
-#endif
-
     RtlDeleteFunctionTable(&r->runtimeFunction);
-
-#ifdef MOZ_STACKWALKING
-    ReleaseStackWalkWorkaroundLock();
-#endif
 }
 #endif
 
 void*
 js::jit::AllocateExecutableMemory(void* addr, size_t bytes, unsigned permissions, const char* tag,
                                   size_t pageSize)
 {
     MOZ_ASSERT(bytes % pageSize == 0);
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
@@ -183,17 +183,16 @@ StackWalkInitCriticalAddress()
 
 #if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) // WIN32 x86 stack walking code
 
 #include <windows.h>
 #include <process.h>
 #include <stdio.h>
 #include <malloc.h>
 #include "mozilla/ArrayUtils.h"
-#include "mozilla/StackWalk_windows.h"
 
 #include <imagehlp.h>
 // We need a way to know if we are building for WXP (or later), as if we are, we
 // need to use the newer 64-bit APIs. API_VERSION_NUMBER seems to fit the bill.
 // A value of 9 indicates we want to use the new APIs.
 #if API_VERSION_NUMBER < 9
 #error Too old imagehlp.h
 #endif
@@ -437,59 +436,16 @@ WalkStackMain64(struct WalkStackData* aD
 #if defined(_M_IX86) || defined(_M_IA64)
     if (frame64.AddrReturn.Offset == 0) {
       break;
     }
 #endif
   }
 }
 
-// The JIT needs to allocate executable memory. Because of the inanity of
-// the win64 APIs, this requires locks that stalk walkers also need. Provide
-// another lock to allow synchronization around these resources.
-#ifdef _M_AMD64
-
-struct CriticalSectionAutoInitializer {
-    CRITICAL_SECTION lock;
-
-    CriticalSectionAutoInitializer() {
-      InitializeCriticalSection(&lock);
-    }
-};
-
-static CriticalSectionAutoInitializer gWorkaroundLock;
-
-#endif // _M_AMD64
-
-MFBT_API void
-AcquireStackWalkWorkaroundLock()
-{
-#ifdef _M_AMD64
-  EnterCriticalSection(&gWorkaroundLock.lock);
-#endif
-}
-
-MFBT_API bool
-TryAcquireStackWalkWorkaroundLock()
-{
-#ifdef _M_AMD64
-  return TryEnterCriticalSection(&gWorkaroundLock.lock);
-#else
-  return true;
-#endif
-}
-
-MFBT_API void
-ReleaseStackWalkWorkaroundLock()
-{
-#ifdef _M_AMD64
-  LeaveCriticalSection(&gWorkaroundLock.lock);
-#endif
-}
-
 static unsigned int WINAPI
 WalkStackThread(void* aData)
 {
   BOOL msgRet;
   MSG msg;
 
   // Call PeekMessage to force creation of a message queue so that
   // other threads can safely post events to us.
deleted file mode 100644
--- a/mozglue/misc/StackWalk_windows.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef mozilla_StackWalk_windows_h
-#define mozilla_StackWalk_windows_h
-
-#include "mozilla/Types.h"
-
-/**
- * Allow stack walkers to work around the egregious win64 dynamic lookup table
- * list API by locking around SuspendThread to avoid deadlock.
- *
- * See comment in StackWalk.cpp
- */
-MFBT_API void
-AcquireStackWalkWorkaroundLock();
-
-MFBT_API bool
-TryAcquireStackWalkWorkaroundLock();
-
-MFBT_API void
-ReleaseStackWalkWorkaroundLock();
-
-#endif // mozilla_StackWalk_windows_h
--- a/mozglue/misc/moz.build
+++ b/mozglue/misc/moz.build
@@ -2,17 +2,16 @@ FINAL_LIBRARY = 'mozglue'
 
 EXPORTS.mozilla += [
     'StackWalk.h',
     'TimeStamp.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS.mozilla += [
-        'StackWalk_windows.h',
         'TimeStamp_windows.h',
     ]
 
 SOURCES += [
     'TimeStamp.cpp',
 ]
 
 OS_LIBS += CONFIG['REALTIME_LIBS']
--- a/netwerk/base/ProxyAutoConfig.cpp
+++ b/netwerk/base/ProxyAutoConfig.cpp
@@ -752,18 +752,16 @@ ProxyAutoConfig::SetupJS()
   MOZ_ASSERT(!GetRunning(), "JIT is running");
 
   delete mJSContext;
   mJSContext = nullptr;
 
   if (mPACScript.IsEmpty())
     return NS_ERROR_FAILURE;
 
-  NS_GetCurrentThread()->SetCanInvokeJS(true);
-
   mJSContext = JSContextWrapper::Create();
   if (!mJSContext)
     return NS_ERROR_FAILURE;
 
   JSContext* cx = mJSContext->Context();
   JSAutoRequest ar(cx);
   JSAutoCompartment ac(cx, mJSContext->Global());
   AutoPACErrorReporter aper(cx);
--- a/tools/profiler/core/ThreadInfo.cpp
+++ b/tools/profiler/core/ThreadInfo.cpp
@@ -2,18 +2,16 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ThreadInfo.h"
 #include "ThreadProfile.h"
 
-#include "mozilla/DebugOnly.h""
-
 ThreadInfo::ThreadInfo(const char* aName, int aThreadId,
                        bool aIsMainThread, PseudoStack* aPseudoStack,
                        void* aStackTop)
   : mName(strdup(aName))
   , mThreadId(aThreadId)
   , mIsMainThread(aIsMainThread)
   , mPseudoStack(aPseudoStack)
   , mPlatformData(Sampler::AllocPlatformData(aThreadId))
@@ -47,25 +45,8 @@ ThreadInfo::SetPendingDelete()
   mPendingDelete = true;
   // We don't own the pseudostack so disconnect it.
   mPseudoStack = nullptr;
   if (mProfile) {
     mProfile->SetPendingDelete();
   }
 }
 
-bool
-ThreadInfo::CanInvokeJS() const
-{
-#ifdef SPS_STANDALONE
-  return false;
-#else
-  nsIThread* thread = GetThread();
-  if (!thread) {
-    MOZ_ASSERT(IsMainThread());
-    return true;
-  }
-  bool result;
-  mozilla::DebugOnly<nsresult> rv = thread->GetCanInvokeJS(&result);
-  MOZ_ASSERT(NS_SUCCEEDED(rv));
-  return result;
-#endif
-}
--- a/tools/profiler/core/ThreadInfo.h
+++ b/tools/profiler/core/ThreadInfo.h
@@ -30,21 +30,17 @@ class ThreadInfo {
   virtual void SetPendingDelete();
   bool IsPendingDelete() const { return mPendingDelete; }
 
 #ifndef SPS_STANDALONE
   /**
    * May be null for the main thread if the profiler was started during startup
    */
   nsIThread* GetThread() const { return mThread.get(); }
-
 #endif
-
-  bool CanInvokeJS() const;
-
  private:
   char* mName;
   int mThreadId;
   const bool mIsMainThread;
   PseudoStack* mPseudoStack;
   PlatformData* mPlatformData;
   ThreadProfile* mProfile;
   void* mStackTop;
--- a/tools/profiler/core/ThreadProfile.h
+++ b/tools/profiler/core/ThreadProfile.h
@@ -44,19 +44,16 @@ public:
   PlatformData* GetPlatformData() const { return mPlatformData; }
   void* GetStackTop() const { return mStackTop; }
   void DuplicateLastSample();
 
   ThreadInfo* GetThreadInfo() const { return mThreadInfo; }
 #ifndef SPS_STANDALONE
   ThreadResponsiveness* GetThreadResponsiveness() { return &mRespInfo; }
 #endif
-
-  bool CanInvokeJS() const { return mThreadInfo->CanInvokeJS(); }
-
   void SetPendingDelete()
   {
     mPseudoStack = nullptr;
     mPlatformData = nullptr;
   }
 
   uint32_t bufferGeneration() const {
     return mBuffer->mGeneration;
--- a/tools/profiler/core/platform-win32.cc
+++ b/tools/profiler/core/platform-win32.cc
@@ -7,17 +7,17 @@
 //    notice, this list of conditions and the following disclaimer.
 //  * Redistributions in binary form must reproduce the above copyright
 //    notice, this list of conditions and the following disclaimer in
 //    the documentation and/or other materials provided with the
 //    distribution.
 //  * Neither the name of Google, Inc. nor the names of its contributors
 //    may be used to endorse or promote products derived from this
 //    software without specific prior written permission.
-//
+// 
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
@@ -32,19 +32,16 @@
 #include "platform.h"
 #include "GeckoSampler.h"
 #include "ThreadResponsiveness.h"
 #include "ProfileEntry.h"
 
 // Memory profile
 #include "nsMemoryReporterManager.h"
 
-#include "mozilla/StackWalk_windows.h"
-
-
 class PlatformData {
  public:
   // Get a handle to the calling thread. This is the thread that we are
   // going to profile. We need to make a copy of the handle because we are
   // going to use it in the sampler thread. Using GetThreadHandle() will
   // not work in this case. We're using OpenThread because DuplicateHandle
   // for some reason doesn't work in Chrome's sandbox.
   PlatformData(int aThreadId) : profiled_thread_(OpenThread(THREAD_GET_CONTEXT |
@@ -99,17 +96,17 @@ class SamplerThread : public Thread {
 
   static void StartSampler(Sampler* sampler) {
     if (instance_ == NULL) {
       instance_ = new SamplerThread(sampler->interval(), sampler);
       instance_->Start();
     } else {
       ASSERT(instance_->interval_ == sampler->interval());
     }
-  }
+  } 
 
   static void StopSampler() {
     instance_->Join();
     delete instance_;
     instance_ = NULL;
   }
 
   // Implement Thread::Run().
@@ -186,39 +183,16 @@ class SamplerThread : public Thread {
 
     // Unique Set Size is not supported on Windows.
     sample->ussMemory = 0;
 
     static const DWORD kSuspendFailed = static_cast<DWORD>(-1);
     if (SuspendThread(profiled_thread) == kSuspendFailed)
       return;
 
-    // Threads that may invoke JS require extra attention. Since, on windows,
-    // the jits also need to modify the same dynamic function table that we need
-    // to get a stack trace, we have to be wary of that to avoid deadlock.
-    //
-    // When embedded in Gecko, for threads that aren't the main thread,
-    // CanInvokeJS consults an unlocked value in the nsIThread, so we must
-    // consult this after suspending the profiled thread to avoid racing
-    // against a value change.
-    if (thread_profile->CanInvokeJS()) {
-      if (!TryAcquireStackWalkWorkaroundLock()) {
-        ResumeThread(profiled_thread);
-        return;
-      }
-
-      // It is safe to immediately drop the lock. We only need to contend with
-      // the case in which the profiled thread held needed system resources.
-      // If the profiled thread had held those resources, the trylock would have
-      // failed. Anyone else who grabs those resources will continue to make
-      // progress, since those threads are not suspended. Because of this,
-      // we cannot deadlock with them, and should let them run as they please.
-      ReleaseStackWalkWorkaroundLock();
-    }
-
     // Using only CONTEXT_CONTROL is faster but on 64-bit it causes crashes in
     // RtlVirtualUnwind (see bug 1120126) so we set all the flags.
 #if V8_HOST_ARCH_X64
     context.ContextFlags = CONTEXT_FULL;
 #else
     context.ContextFlags = CONTEXT_CONTROL;
 #endif
     if (GetThreadContext(profiled_thread, &context) != 0) {
--- a/xpcom/base/CycleCollectedJSContext.cpp
+++ b/xpcom/base/CycleCollectedJSContext.cpp
@@ -507,18 +507,16 @@ CycleCollectedJSContext::Initialize(JSCo
   mBaseRecursionDepth = RecursionDepth();
 
   mozilla::dom::InitScriptSettings();
   mJSContext = JS_NewContext(aMaxBytes, aMaxNurseryBytes, aParentContext);
   if (!mJSContext) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
-  NS_GetCurrentThread()->SetCanInvokeJS(true);
-
   if (!JS_AddExtraGCRootsTracer(mJSContext, TraceBlackJS, this)) {
     MOZ_CRASH("JS_AddExtraGCRootsTracer failed");
   }
   JS_SetGrayGCRootsTracer(mJSContext, TraceGrayJS, this);
   JS_SetGCCallback(mJSContext, GCCallback, this);
   mPrevGCSliceCallback = JS::SetGCSliceCallback(mJSContext, GCSliceCallback);
 
   if (NS_IsMainThread()) {
--- a/xpcom/threads/HangMonitor.cpp
+++ b/xpcom/threads/HangMonitor.cpp
@@ -11,19 +11,16 @@
 #include "mozilla/Monitor.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ProcessedStack.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/UniquePtr.h"
 #include "nsReadableUtils.h"
 #include "mozilla/StackWalk.h"
-#ifdef _WIN64
-#include "mozilla/StackWalk_windows.h"
-#endif
 #include "nsThreadUtils.h"
 #include "nsXULAppAPI.h"
 
 #ifdef MOZ_CRASHREPORTER
 #include "nsExceptionHandler.h"
 #endif
 
 #ifdef XP_WIN
@@ -144,29 +141,17 @@ GetChromeHangReport(Telemetry::Processed
                     int32_t& aFirefoxUptime)
 {
   MOZ_ASSERT(winMainThreadHandle);
 
   // The thread we're about to suspend might have the alloc lock
   // so allocate ahead of time
   std::vector<uintptr_t> rawStack;
   rawStack.reserve(MAX_CALL_STACK_PCS);
-
-  // Workaround possible deadlock where the main thread is running a
-  // long-standing JS job, and happens to be in the JIT allocator when we
-  // suspend it. Since, on win 64, this requires holding a process lock that
-  // MozStackWalk requires, take this "workaround lock" to avoid deadlock.
-#ifdef _WIN64
-  AcquireStackWalkWorkaroundLock();
-#endif
   DWORD ret = ::SuspendThread(winMainThreadHandle);
-#ifdef _WIN64
-  ReleaseStackWalkWorkaroundLock();
-#endif
-
   if (ret == -1) {
     return;
   }
   MozStackWalk(ChromeStackWalker, /* skipFrames */ 0, /* maxFrames */ 0,
                reinterpret_cast<void*>(&rawStack),
                reinterpret_cast<uintptr_t>(winMainThreadHandle), nullptr);
   ret = ::ResumeThread(winMainThreadHandle);
   if (ret == -1) {
--- a/xpcom/threads/LazyIdleThread.cpp
+++ b/xpcom/threads/LazyIdleThread.cpp
@@ -454,29 +454,16 @@ LazyIdleThread::GetPRThread(PRThread** a
     return mThread->GetPRThread(aPRThread);
   }
 
   *aPRThread = nullptr;
   return NS_ERROR_NOT_AVAILABLE;
 }
 
 NS_IMETHODIMP
-LazyIdleThread::GetCanInvokeJS(bool* aCanInvokeJS)
-{
-  *aCanInvokeJS = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-LazyIdleThread::SetCanInvokeJS(bool aCanInvokeJS)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
 LazyIdleThread::AsyncShutdown()
 {
   ASSERT_OWNING_THREAD();
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 LazyIdleThread::Shutdown()
--- a/xpcom/threads/nsIThread.idl
+++ b/xpcom/threads/nsIThread.idl
@@ -22,24 +22,16 @@ interface nsIThread : nsIEventTarget
 {
   /**
    * @returns
    *   The NSPR thread object corresponding to this nsIThread.
    */
   [noscript] readonly attribute PRThread PRThread;
 
   /**
-   * @returns
-   *  Whether or not this thread may call into JS. Used in the profiler
-   *  to avoid some unnecessary locking.
-   */
-  [noscript] attribute boolean CanInvokeJS;
-
-
-  /**
    * Shutdown the thread.  This method prevents further dispatch of events to
    * the thread, and it causes any pending events to run to completion before
    * the thread joins (see PR_JoinThread) with the current thread.  During this
    * method call, events for the current thread may be processed.
    *
    * This method MAY NOT be executed from the thread itself.  Instead, it is
    * meant to be executed from another thread (usually the thread that created
    * this thread or the main application thread).  When this function returns,
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -591,17 +591,16 @@ nsThread::nsThread(MainThreadFlag aMainT
   , mPriority(PRIORITY_NORMAL)
   , mThread(nullptr)
   , mNestedEventLoopDepth(0)
   , mStackSize(aStackSize)
   , mShutdownContext(nullptr)
   , mShutdownRequired(false)
   , mEventsAreDoomed(false)
   , mIsMainThread(aMainThread)
-  , mCanInvokeJS(false)
 {
 }
 
 nsThread::~nsThread()
 {
   NS_ASSERTION(mRequestedShutdownContexts.IsEmpty(),
                "shouldn't be waiting on other threads to shutdown");
 #ifdef DEBUG
@@ -797,30 +796,16 @@ nsThread::IsOnCurrentThread(bool* aResul
 NS_IMETHODIMP
 nsThread::GetPRThread(PRThread** aResult)
 {
   *aResult = mThread;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsThread::GetCanInvokeJS(bool* aResult)
-{
-  *aResult = mCanInvokeJS;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsThread::SetCanInvokeJS(bool aCanInvokeJS)
-{
-  mCanInvokeJS = aCanInvokeJS;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsThread::AsyncShutdown()
 {
   LOG(("THRD(%p) async shutdown\n", this));
 
   // XXX If we make this warn, then we hit that warning at xpcom shutdown while
   //     shutting down a thread in a thread pool.  That happens b/c the thread
   //     in the thread pool is already shutdown by the thread manager.
   if (!mThread) {
--- a/xpcom/threads/nsThread.h
+++ b/xpcom/threads/nsThread.h
@@ -217,19 +217,16 @@ protected:
   struct nsThreadShutdownContext* mShutdownContext;
   // The shutdown contexts for any other threads we've asked to shut down.
   nsTArray<nsAutoPtr<struct nsThreadShutdownContext>> mRequestedShutdownContexts;
 
   bool mShutdownRequired;
   // Set to true when events posted to this thread will never run.
   bool mEventsAreDoomed;
   MainThreadFlag mIsMainThread;
-
-  // Set to true if this thread creates a JSRuntime.
-  bool mCanInvokeJS;
 };
 
 #if defined(XP_UNIX) && !defined(ANDROID) && !defined(DEBUG) && HAVE_UALARM \
   && defined(_GNU_SOURCE)
 # define MOZ_CANARY
 
 extern int sCanaryOutputFD;
 #endif