Bug 1255817 part 3. Remove the now-unreachable JS_ReportPendingException call in nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 23 Mar 2016 11:44:54 -0400
changeset 290075 870cb629e5752827c14884473c25e118c19ba27a
parent 290074 a45a6cde6558c0ed0797a29818eec13c4e0e2196
child 290076 564aabb49527e38cba207a50e4ef5d4ba9758969
push id30114
push usercbook@mozilla.com
push dateThu, 24 Mar 2016 15:15:54 +0000
treeherdermozilla-central@24c5fbde4488 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1255817
milestone48.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 1255817 part 3. Remove the now-unreachable JS_ReportPendingException call in nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject. r=bholley
js/xpconnect/src/XPCWrappedJSClass.cpp
--- a/js/xpconnect/src/XPCWrappedJSClass.cpp
+++ b/js/xpconnect/src/XPCWrappedJSClass.cpp
@@ -271,20 +271,17 @@ nsXPCWrappedJSClass::CallQueryInterfaceO
                     else
                         rv = (nsresult)(jsexception.toInt32());
 
                     if (rv == NS_NOINTERFACE)
                         JS_ClearPendingException(cx);
                 }
             }
 
-            // Don't report if reporting was disabled by someone else.
-            if (!ContextOptionsRef(cx).dontReportUncaught() &&
-                !ContextOptionsRef(cx).autoJSAPIOwnsErrorReporting())
-                JS_ReportPendingException(cx);
+            MOZ_ASSERT(ContextOptionsRef(cx).autoJSAPIOwnsErrorReporting());
         } else if (!success) {
             NS_WARNING("QI hook ran OOMed - this is probably a bug!");
         }
     }
 
     if (success)
         success = JS_ValueToObject(cx, retval, &retObj);