Bug 1177565 - Stop warning if EnsureScriptEnvironment returns NS_ERROR_NOT_AVAILABLE. r=smaug

This commit is contained in:
Eric Rahm 2015-06-29 17:16:31 -07:00
parent 20dc82c90c
commit 2fead310bb

View File

@ -4585,8 +4585,7 @@ nsDocShell::GetDocument()
nsPIDOMWindow*
nsDocShell::GetWindow()
{
NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), nullptr);
return mScriptGlobal;
return NS_SUCCEEDED(EnsureScriptEnvironment()) ? mScriptGlobal : nullptr;
}
NS_IMETHODIMP