Bug 1224596 part 13. Switch gfxUtils to using the new WorkerMainThreadRunnable::Dispatch signature. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 24 Nov 2015 00:04:21 -0500
changeset 273879 10e77d4782163548e74197274ffa493c2c6a5538
parent 273878 318b72381dcb5f28830339f770370ba57a8730ed
child 273880 5f5d781e2fb16b291c651e66858f420a67438e31
push id68416
push userbzbarsky@mozilla.com
push dateTue, 24 Nov 2015 05:04:42 +0000
treeherdermozilla-inbound@227989411ad6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1224596
milestone45.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 1224596 part 13. Switch gfxUtils to using the new WorkerMainThreadRunnable::Dispatch signature. r=khuey
gfx/thebes/gfxUtils.cpp
--- a/gfx/thebes/gfxUtils.cpp
+++ b/gfx/thebes/gfxUtils.cpp
@@ -1650,17 +1650,24 @@ gfxUtils::ThreadSafeGetFeatureStatus(con
                                      int32_t feature, int32_t* status)
 {
   if (!NS_IsMainThread()) {
     dom::workers::WorkerPrivate* workerPrivate =
       dom::workers::GetCurrentThreadWorkerPrivate();
     RefPtr<GetFeatureStatusRunnable> runnable =
       new GetFeatureStatusRunnable(workerPrivate, gfxInfo, feature, status);
 
-    runnable->Dispatch(workerPrivate->GetJSContext());
+    ErrorResult rv;
+    runnable->Dispatch(rv);
+    if (rv.Failed()) {
+        // XXXbz This is totally broken, since we're supposed to just abort
+        // everything up the callstack but the callers basically eat the
+        // exception.  Ah, well.
+        return rv.StealNSResult();
+    }
 
     return runnable->GetNSResult();
   }
 
   return gfxInfo->GetFeatureStatus(feature, status);
 }
 
 /* static */ bool