Bug 829252 followup. Now that WindowRoot has a wrapper cache, we need to be able to deal with ConstructSlimWrapper on things that have no classinfo. r=peterv pending, but landing on CLOSED TREE now to fix orange.
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 29 Jan 2013 10:18:05 -0500
changeset 120225 c669c3af96d4c4ebd7b6c546cb33253abd62921b
parent 120224 27e211d02a7ab9f13d1252cba8c4d4e538df0788
child 120226 361b83661de106d98713f34293497db2d46f86f9
push id24243
push userryanvm@gmail.com
push dateWed, 30 Jan 2013 00:49:21 +0000
treeherdermozilla-central@5c248ef0fe62 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs829252
milestone21.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 829252 followup. Now that WindowRoot has a wrapper cache, we need to be able to deal with ConstructSlimWrapper on things that have no classinfo. r=peterv pending, but landing on CLOSED TREE now to fix orange.
js/xpconnect/src/XPCWrappedNative.cpp
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -3752,16 +3752,21 @@ static uint32_t sSlimWrappers;
 JSBool
 ConstructSlimWrapper(XPCCallContext &ccx,
                      xpcObjectHelper &aHelper,
                      XPCWrappedNativeScope* xpcScope, jsval *rval)
 {
     nsISupports *identityObj = aHelper.GetCanonical();
     nsXPCClassInfo *classInfoHelper = aHelper.GetXPCClassInfo();
 
+    if (!classInfoHelper) {
+        SLIM_LOG_NOT_CREATED(ccx, identityObj, "No classinfo helper");
+        return false;
+    }
+
     XPCNativeScriptableFlags flags(classInfoHelper->GetScriptableFlags());
 
     NS_ASSERTION(flags.DontAskInstanceForScriptable(),
                  "Not supported for cached wrappers!");
 
     JSObject* parent = xpcScope->GetGlobalJSObject();
     if (!flags.WantPreCreate()) {
         SLIM_LOG_NOT_CREATED(ccx, identityObj,