Bug 1018085 - "ASSERTION: Inner window supports nsWrapperCache, fix WrapObject!". r=bz, a=lmandel.
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 06 Jun 2014 14:54:35 +0200
changeset 207083 9a12cabec2fe3a23505571ffd50f931aaf17c6a1
parent 207082 6ff67ee7da2c5a8d815c744e51b08c0c3a232aad
child 207084 dee4619c933ab2b91af3a4b1e77e94010d12864a
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, lmandel
bugs1018085
milestone32.0a2
Bug 1018085 - "ASSERTION: Inner window supports nsWrapperCache, fix WrapObject!". r=bz, a=lmandel.
dom/base/nsGlobalWindow.h
--- a/dom/base/nsGlobalWindow.h
+++ b/dom/base/nsGlobalWindow.h
@@ -345,19 +345,17 @@ public:
   void ReallyCloseWindow();
 
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // nsWrapperCache
   virtual JSObject *WrapObject(JSContext *cx) MOZ_OVERRIDE
   {
-    NS_ASSERTION(IsOuterWindow(),
-                 "Inner window supports nsWrapperCache, fix WrapObject!");
-    return EnsureInnerWindow() ? GetWrapper() : nullptr;
+    return IsInnerWindow() || EnsureInnerWindow() ? GetWrapper() : nullptr;
   }
 
   // nsIGlobalJSObjectHolder
   virtual JSObject *GetGlobalJSObject();
 
   // nsIScriptGlobalObject
   JSObject *FastGetGlobalJSObject() const
   {