XPCNativeWrappers can confuse the short-circuiting code. bug 409291, r+sr=jst a=beltzner
authormrbkap@gmail.com
Fri, 21 Dec 2007 11:06:29 -0800
changeset 9603 e1599cae9e8f429c25ce90f1be92cf6cf88f3acf
parent 9602 c707a0a0bbb7ef087d59c1b203f3b9d9e710d3ee
child 9604 5f259cb889bd8ccb7ab3c926627e4fa363165d20
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbeltzner
bugs409291
milestone1.9b3pre
XPCNativeWrappers can confuse the short-circuiting code. bug 409291, r+sr=jst a=beltzner
caps/src/nsScriptSecurityManager.cpp
--- a/caps/src/nsScriptSecurityManager.cpp
+++ b/caps/src/nsScriptSecurityManager.cpp
@@ -2398,17 +2398,18 @@ nsScriptSecurityManager::doGetObjectPrin
                                         JSCLASS_PRIVATE_IS_NSISUPPORTS))) {
             nsISupports *priv = (nsISupports *)JS_GetPrivate(aCx, aObj);
 
 #ifdef DEBUG
             if (aAllowShortCircuit) {
                 nsCOMPtr<nsIXPConnectWrappedNative> xpcWrapper =
                     do_QueryInterface(priv);
 
-                NS_ASSERTION(!xpcWrapper,
+                NS_ASSERTION(!xpcWrapper ||
+                             !strcmp(jsClass->name, "XPCNativeWrapper"),
                              "Uh, an nsIXPConnectWrappedNative with the "
                              "wrong JSClass or getObjectOps hooks!");
             }
 #endif
 
             nsCOMPtr<nsIScriptObjectPrincipal> objPrin =
                 do_QueryInterface(priv);