Fixing bug 318461. Move SetNewDocument() and SetOpenerWindow() from nsIScriptGlobalObject to nsPIDOMWindow to clean out non-script related methods form the nsIScriptGlobalObject interface. r=mrbkap@gmail.com, sr=bzbarsky@mit.edu
git-svn-id: svn://10.0.0.236/trunk@185536 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1932,16 +1932,18 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
return rv;
|
||||
}
|
||||
|
||||
// Before we reset the doc notify the globalwindow of the change.
|
||||
// Before we reset the doc notify the globalwindow of the change,
|
||||
// but only if we still have a window (i.e. our window object the
|
||||
// current inner window in our outer window).
|
||||
|
||||
if (mScriptGlobalObject) {
|
||||
nsPIDOMWindow *window = GetInnerWindow();
|
||||
if (window) {
|
||||
// Hold onto ourselves on the offchance that we're down to one ref
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> kungFuDeathGrip =
|
||||
do_QueryInterface((nsIHTMLDocument*)this);
|
||||
|
||||
rv = mScriptGlobalObject->SetNewDocument((nsDocument *)this, nsnull,
|
||||
PR_FALSE);
|
||||
rv = window->SetNewDocument(this, nsnull, PR_FALSE);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
|
||||
Reference in New Issue
Block a user