Only do this security check if we don't already have a parser, since this call
won't do anything anyway. bug 364309, r+sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@217852 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1895,6 +1895,12 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// If we already have a parser we ignore the document.open call.
|
||||
if (mParser) {
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!nsContentUtils::CanCallerAccess(NS_STATIC_CAST(nsIDOMHTMLDocument*, this))) {
|
||||
nsPIDOMWindow *win = GetWindow();
|
||||
if (win) {
|
||||
@@ -1908,12 +1914,6 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
}
|
||||
}
|
||||
|
||||
// If we already have a parser we ignore the document.open call.
|
||||
if (mParser) {
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!aContentType.EqualsLiteral("text/html") &&
|
||||
!aContentType.EqualsLiteral("text/plain")) {
|
||||
NS_WARNING("Unsupported type; fix the caller");
|
||||
|
||||
Reference in New Issue
Block a user