diff --git a/dom/src/base/nsDOMWindowList.cpp b/dom/src/base/nsDOMWindowList.cpp index d44f69e5e88f..c3c8cb76ee44 100644 --- a/dom/src/base/nsDOMWindowList.cpp +++ b/dom/src/base/nsDOMWindowList.cpp @@ -116,7 +116,8 @@ nsDOMWindowList::NamedItem(const nsString& aName, nsIDOMWindow** aReturn) mWebShell->FindChildWithName(aName.GetUnicode(), *getter_AddRefs(item)); nsCOMPtr globalObject(do_GetInterface(item)); - if (NS_WARN_IF_FALSE(globalObject, "Couldn't get to the globalObject")) { + NS_ASSERTION(globalObject != nsnull, "Couldn't get to the globalObject"); + if (globalObject) { CallQueryInterface(globalObject.get(), aReturn); } else {