Bug 618662. Make nsIDocument::GetWindow a const method. r=bzbarsky

This commit is contained in:
Anna 2011-03-25 23:52:52 -04:00
parent 6651a096c6
commit ad9bb74766
3 changed files with 5 additions and 5 deletions

View File

@ -689,7 +689,7 @@ public:
/**
* Return the window containing the document (the outer window).
*/
nsPIDOMWindow *GetWindow()
nsPIDOMWindow *GetWindow() const
{
return mWindow ? mWindow->GetOuterWindow() : GetWindowInternal();
}
@ -707,7 +707,7 @@ public:
/**
* Return the outer window ID.
*/
PRUint64 OuterWindowID()
PRUint64 OuterWindowID() const
{
nsPIDOMWindow *window = GetWindow();
return window ? window->WindowID() : 0;
@ -1531,7 +1531,7 @@ protected:
nsPropertyTable* GetExtraPropertyTable(PRUint16 aCategory);
// Never ever call this. Only call GetWindow!
virtual nsPIDOMWindow *GetWindowInternal() = 0;
virtual nsPIDOMWindow *GetWindowInternal() const = 0;
// Never ever call this. Only call GetInnerWindow!
virtual nsPIDOMWindow *GetInnerWindowInternal() = 0;

View File

@ -3889,7 +3889,7 @@ nsDocument::SetScriptHandlingObject(nsIScriptGlobalObject* aScriptObject)
}
nsPIDOMWindow *
nsDocument::GetWindowInternal()
nsDocument::GetWindowInternal() const
{
NS_ASSERTION(!mWindow, "This should not be called when mWindow is not null!");

View File

@ -1058,7 +1058,7 @@ protected:
const nsAString& aType,
PRBool aPersisted);
virtual nsPIDOMWindow *GetWindowInternal();
virtual nsPIDOMWindow *GetWindowInternal() const;
virtual nsPIDOMWindow *GetInnerWindowInternal();
virtual nsIScriptGlobalObject* GetScriptHandlingObjectInternal() const;
virtual PRBool InternalAllowXULXBL();