mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1440407 P1 Add nsPIDOMWindowInner::AsGlobal() to cheaply cast to nsIGlobalObject*. r=mystor
This commit is contained in:
parent
855b730941
commit
d3ec34f518
@ -7937,6 +7937,18 @@ nsPIDOMWindowInner::GetDocGroup() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIGlobalObject*
|
||||
nsPIDOMWindowInner::AsGlobal()
|
||||
{
|
||||
return nsGlobalWindowInner::Cast(this);
|
||||
}
|
||||
|
||||
const nsIGlobalObject*
|
||||
nsPIDOMWindowInner::AsGlobal() const
|
||||
{
|
||||
return nsGlobalWindowInner::Cast(this);
|
||||
}
|
||||
|
||||
// XXX: Can we define this in a header instead of here?
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -155,6 +155,9 @@ public:
|
||||
return this;
|
||||
}
|
||||
|
||||
nsIGlobalObject* AsGlobal();
|
||||
const nsIGlobalObject* AsGlobal() const;
|
||||
|
||||
nsPIDOMWindowOuter* GetOuterWindow() const {
|
||||
return mOuterWindow;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user