Bug 433328: properly handle null inner window, patch by Blake Kaplan <mrbkap@gmail.com>, r+sr=jst, a=shaver
git-svn-id: svn://10.0.0.236/trunk@251899 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
370e851799
commit
efe69d9e13
@ -537,8 +537,12 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsIScriptGlobalObject *globalObject = mDocument->GetScriptGlobalObject();
|
||||
NS_ENSURE_TRUE(globalObject, NS_ERROR_FAILURE);
|
||||
nsPIDOMWindow *pwin = mDocument->GetInnerWindow();
|
||||
if (!pwin || !pwin->IsInnerWindow()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<nsIScriptGlobalObject> globalObject = do_QueryInterface(pwin);
|
||||
NS_ASSERTION(globalObject, "windows must be global objects");
|
||||
|
||||
// Get the script-type to be used by this element.
|
||||
nsCOMPtr<nsIContent> scriptContent(do_QueryInterface(aRequest->mElement));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user