Bug 1257568. Remove the JSContext argument of WorkerPrivate::Kill. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 17 Mar 2016 23:23:55 -0400
changeset 342017 a1a7da507e4e2deb751179875b28e3b84ddd381a
parent 342016 238a18a30a15c07db6b71c8586dcd7c434aaa493
child 342018 20c9fb1e81bace4582d27311c93fc0c005ab8eb0
push id13342
push userbmo:james@hoppipolla.co.uk
push dateFri, 18 Mar 2016 09:55:58 +0000
reviewerskhuey
bugs1257568
milestone48.0a1
Bug 1257568. Remove the JSContext argument of WorkerPrivate::Kill. r=khuey
dom/workers/RuntimeService.cpp
dom/workers/WorkerPrivate.h
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -1931,21 +1931,18 @@ RuntimeService::Shutdown()
     AutoTArray<WorkerPrivate*, 100> workers;
     AddAllTopLevelWorkersToArray(workers);
 
     if (!workers.IsEmpty()) {
       // Cancel all top-level workers.
       {
         MutexAutoUnlock unlock(mMutex);
 
-        AutoSafeJSContext cx;
-        JSAutoRequest ar(cx);
-
         for (uint32_t index = 0; index < workers.Length(); index++) {
-          if (!workers[index]->Kill(cx)) {
+          if (!workers[index]->Kill()) {
             NS_WARNING("Failed to cancel worker!");
           }
         }
       }
     }
   }
 }
 
--- a/dom/workers/WorkerPrivate.h
+++ b/dom/workers/WorkerPrivate.h
@@ -287,17 +287,17 @@ public:
 
   bool
   Cancel()
   {
     return Notify(Canceling);
   }
 
   bool
-  Kill(JSContext* aCx)
+  Kill()
   {
     return Notify(Killing);
   }
 
   // We can assume that an nsPIDOMWindow will be available for Freeze, Thaw
   // as these are only used for globals going in and out of the bfcache.
   //
   // XXXbz: This is a bald-faced lie given the uses in RegisterSharedWorker and