Bug 1275704 part 2. Remove the now-unused aForceReport argument of nsXPCWrappedJSClass::CheckForException. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 26 May 2016 19:39:03 -0400
changeset 340245 f72a83afc1b40e66d6980f08e68e86b8a1fd1810
parent 340244 6fc284339ae3a17d4ab750089614e2c8c8fe4c90
child 340246 85d98afa234a770651ef4bca1ad643c63bdcb107
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1275704
milestone49.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 1275704 part 2. Remove the now-unused aForceReport argument of nsXPCWrappedJSClass::CheckForException. r=bholley
js/xpconnect/src/XPCWrappedJSClass.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCWrappedJSClass.cpp
+++ b/js/xpconnect/src/XPCWrappedJSClass.cpp
@@ -769,18 +769,17 @@ nsXPCWrappedJSClass::CleanupOutparams(JS
         *static_cast<void**>(p) = nullptr;
     }
 }
 
 nsresult
 nsXPCWrappedJSClass::CheckForException(XPCCallContext & ccx,
                                        AutoEntryScript& aes,
                                        const char * aPropertyName,
-                                       const char * anInterfaceName,
-                                       bool aForceReport)
+                                       const char * anInterfaceName)
 {
     XPCContext * xpcc = ccx.GetXPCContext();
     JSContext * cx = ccx.GetJSContext();
     MOZ_ASSERT(cx == aes.cx());
     nsCOMPtr<nsIException> xpc_exception;
     /* this one would be set by our error reporter */
 
     xpcc->GetException(getter_AddRefs(xpc_exception));
@@ -976,17 +975,17 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWra
     // [implicit_jscontext] and [optional_argc] have a different calling
     // convention, which we don't support for JS-implemented components.
     if (info->WantsOptArgc() || info->WantsContext()) {
         const char* str = "IDL methods marked with [implicit_jscontext] "
                           "or [optional_argc] may not be implemented in JS";
         // Throw and warn for good measure.
         JS_ReportError(cx, str);
         NS_WARNING(str);
-        return CheckForException(ccx, aes, name, GetInterfaceName(), false);
+        return CheckForException(ccx, aes, name, GetInterfaceName());
     }
 
     RootedValue fval(cx);
     RootedObject obj(cx, wrapper->GetJSObject());
     RootedObject thisObj(cx, obj);
 
     JSAutoCompartment ac(cx, obj);
 
@@ -1238,27 +1237,18 @@ pre_call_clean_up:
                                            nullptr, getter_AddRefs(e), nullptr, nullptr);
             xpcc->SetException(e);
             if (sz)
                 JS_smprintf_free(sz);
             success = false;
         }
     }
 
-    if (!success) {
-        bool forceReport;
-        if (NS_FAILED(mInfo->IsFunction(&forceReport)))
-            forceReport = false;
-
-        // May also want to check if we're moving from content->chrome and force
-        // a report in that case.
-
-        return CheckForException(ccx, aes, name, GetInterfaceName(),
-                                 forceReport);
-    }
+    if (!success)
+        return CheckForException(ccx, aes, name, GetInterfaceName());
 
     XPCJSRuntime::Get()->SetPendingException(nullptr); // XXX necessary?
 
     // convert out args and result
     // NOTE: this is the total number of native params, not just the args
     // Convert independent params only.
     // When we later convert the dependent params (if any) we will know that
     // the params upon which they depend will have already been converted -
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2295,18 +2295,17 @@ public:
                                               JSObject* aJSObj,
                                               const nsAString& aName,
                                               nsIVariant** aResult);
 
 private:
     static nsresult CheckForException(XPCCallContext & ccx,
                                       mozilla::dom::AutoEntryScript& aes,
                                       const char * aPropertyName,
-                                      const char * anInterfaceName,
-                                      bool aForceReport);
+                                      const char * anInterfaceName);
     virtual ~nsXPCWrappedJSClass();
 
     nsXPCWrappedJSClass();   // not implemented
     nsXPCWrappedJSClass(JSContext* cx, REFNSIID aIID,
                         nsIInterfaceInfo* aInfo);
 
     bool IsReflectable(uint16_t i) const
         {return (bool)(mDescriptors[i/32] & (1 << (i%32)));}