Bug 851851 - Null check win. r=me
authorBobby Holley <bobbyholley@gmail.com>
Sun, 17 Mar 2013 22:42:42 -0700
changeset 125129 b03bb3ce8ceee784f3a26fc150f77a57438ca891
parent 125128 a9a25781850ee0a8b56b547c8b81b58577644794
child 125135 b2636816c7fdd53110d877c57d7fcbb1c4396bdc
push id24447
push userbobbyholley@gmail.com
push dateMon, 18 Mar 2013 05:43:05 +0000
treeherdermozilla-central@b03bb3ce8cee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs851851
milestone22.0a1
first release with
nightly linux32
b03bb3ce8cee / 22.0a1 / 20130318030947 / files
nightly linux64
b03bb3ce8cee / 22.0a1 / 20130318030947 / files
nightly mac
b03bb3ce8cee / 22.0a1 / 20130318030947 / files
nightly win32
b03bb3ce8cee / 22.0a1 / 20130318030947 / files
nightly win64
b03bb3ce8cee / 22.0a1 / 20130318030947 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 851851 - Null check win. r=me
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3640,17 +3640,17 @@ nsWindowSH::GlobalScopePolluterNewResolv
 
   if (!document) {
     // If we don't have a document, return early.
 
     return JS_TRUE;
   }
 
   nsGlobalWindow* win = static_cast<nsGlobalWindow*>(document->GetWindow());
-  MOZ_ASSERT(win);
+  NS_ENSURE_TRUE(win, JS_TRUE);
   if (win->GetLength() > 0) {
     nsCOMPtr<nsIDOMWindow> child_win = win->GetChildWindow(id);
     if (child_win) {
       // We found a subframe of the right name, so define the property
       // on the GSP. This property is a read-only accessor. Shadowing via
       // |var foo| in global scope is still allowed, since |var| only looks
       // up |own| properties. But unqualified shadowing will fail, per-spec.
       if (!JS_DefinePropertyById(cx, obj, id, JS::UndefinedValue(),