Bug 1479475 part 2. Remove dead code in nsGlobalWindowOuter that is inner-window-only. r=nika

This commit is contained in:
Boris Zbarsky 2018-07-31 17:27:02 -04:00
Родитель c70cb82b91
Коммит c15a7558ea
3 изменённых файлов: 0 добавлений и 71 удалений

Просмотреть файл

@ -854,13 +854,6 @@ nsGlobalWindowOuter::nsGlobalWindowOuter()
// remain frozen until they get an inner window.
MOZ_ASSERT(IsFrozen());
if (XRE_IsContentProcess()) {
nsCOMPtr<nsIDocShell> docShell = GetDocShell();
if (docShell) {
mTabChild = docShell->GetTabChild();
}
}
// We could have failed the first time through trying
// to create the entropy collector, so we should
// try to get one until we succeed.
@ -1146,7 +1139,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindowOuter)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mLocalStorage)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSuspendedDoc)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentPrincipal)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTabChild)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDoc)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIdleService)
@ -1174,7 +1166,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindowOuter)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mLocalStorage)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mSuspendedDoc)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocumentPrincipal)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTabChild)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDoc)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mIdleService)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mIdleObservers)
@ -1256,12 +1247,6 @@ nsGlobalWindowOuter::GetGlobalJSObject()
return FastGetGlobalJSObject();
}
void
nsGlobalWindowOuter::TraceGlobalJSObject(JSTracer* aTrc)
{
TraceWrapper(aTrc, "active window global");
}
bool
nsGlobalWindowOuter::WouldReuseInnerWindow(nsIDocument* aNewDocument)
{
@ -2183,7 +2168,6 @@ nsGlobalWindowOuter::DetachFromDocShell()
// Remember the document's principal and URI.
mDocumentPrincipal = mDoc->NodePrincipal();
mDocumentURI = mDoc->GetDocumentURI();
mDocBaseURI = mDoc->GetDocBaseURI();
// Release our document reference
DropOuterWindowDocs();
@ -6655,12 +6639,6 @@ nsGlobalWindowOuter::SetIsBackgroundInternal(bool aIsBackground)
mIsBackground = aIsBackground;
}
void
nsGlobalWindowOuter::MaybeUpdateTouchState()
{
FORWARD_TO_INNER_VOID(MaybeUpdateTouchState, ());
}
void
nsGlobalWindowOuter::SetChromeEventHandler(EventTarget* aChromeEventHandler)
{
@ -7244,13 +7222,6 @@ nsGlobalWindowOuter::SecurityCheckURL(const char *aURL, nsIURI** aURI)
return NS_OK;
}
bool
nsGlobalWindowOuter::IsPrivateBrowsing()
{
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(GetDocShell());
return loadContext && loadContext->UsePrivateBrowsing();
}
void
nsGlobalWindowOuter::FlushPendingNotifications(FlushType aType)
{
@ -7336,29 +7307,12 @@ nsGlobalWindowOuter::RestoreWindowState(nsISupports *aState)
return NS_OK;
}
// XXX(nika): Can we remove these?
void
nsGlobalWindowOuter::EventListenerAdded(nsAtom* aType)
{
}
void
nsGlobalWindowOuter::EventListenerRemoved(nsAtom* aType)
{
}
void
nsGlobalWindowOuter::AddSizeOfIncludingThis(nsWindowSizes& aWindowSizes) const
{
aWindowSizes.mDOMOtherSize += aWindowSizes.mState.mMallocSizeOf(this);
}
bool
nsGlobalWindowOuter::UpdateVRDisplays(nsTArray<RefPtr<mozilla::dom::VRDisplay>>& aDevices)
{
FORWARD_TO_INNER(UpdateVRDisplays, (aDevices), false);
}
uint32_t
nsGlobalWindowOuter::GetAutoActivateVRDisplayID()
{
@ -7738,12 +7692,6 @@ nsPIDOMWindowOuter::GetDocumentURI() const
}
nsIURI*
nsPIDOMWindowOuter::GetDocBaseURI() const
{
return mDoc ? mDoc->GetDocBaseURI() : mDocBaseURI.get();
}
void
nsPIDOMWindowOuter::MaybeCreateDoc()
{

Просмотреть файл

@ -245,8 +245,6 @@ public:
return GetWrapperPreserveColor();
}
void TraceGlobalJSObject(JSTracer* aTrc);
virtual nsresult EnsureScriptEnvironment() override;
virtual nsIScriptContext *GetScriptContext() override;
@ -345,8 +343,6 @@ public:
virtual bool CanClose() override;
virtual void ForceClose() override;
virtual void MaybeUpdateTouchState() override;
// Outer windows only.
virtual bool DispatchCustomEvent(const nsAString& aEventName) override;
bool DispatchResizeEvent(const mozilla::CSSIntSize& aSize);
@ -363,11 +359,6 @@ public:
nsIWidget* aWidget, nsIScreen* aScreen);
bool FullScreen() const;
using EventTarget::EventListenerAdded;
virtual void EventListenerAdded(nsAtom* aType) override;
using EventTarget::EventListenerRemoved;
virtual void EventListenerRemoved(nsAtom* aType) override;
// nsIInterfaceRequestor
NS_DECL_NSIINTERFACEREQUESTOR
@ -506,9 +497,6 @@ public:
mAllowScriptsToClose = true;
}
// Update the VR displays for this window
bool UpdateVRDisplays(nsTArray<RefPtr<mozilla::dom::VRDisplay>>& aDisplays);
// Outer windows only.
uint32_t GetAutoActivateVRDisplayID();
// Outer windows only.
@ -915,7 +903,6 @@ public:
already_AddRefed<nsIBaseWindow> GetTreeOwnerWindow();
already_AddRefed<nsIWebBrowserChrome> GetWebBrowserChrome();
nsresult SecurityCheckURL(const char *aURL, nsIURI** aURI);
bool IsPrivateBrowsing();
bool PopupWhitelisted();
PopupControlState RevisePopupAbuseLevel(PopupControlState);
@ -1118,8 +1105,6 @@ protected:
RefPtr<mozilla::dom::Storage> mLocalStorage;
nsCOMPtr<nsIPrincipal> mDocumentPrincipal;
// mTabChild is only ever populated in the content process.
nsCOMPtr<nsITabChild> mTabChild;
uint32_t mSerial;

Просмотреть файл

@ -872,14 +872,11 @@ public:
return mParentTarget;
}
virtual void MaybeUpdateTouchState() {}
nsIDocument* GetExtantDoc() const
{
return mDoc;
}
nsIURI* GetDocumentURI() const;
nsIURI* GetDocBaseURI() const;
nsIDocument* GetDoc()
{
@ -1178,7 +1175,6 @@ protected:
nsCOMPtr<nsIDocument> mDoc; // strong
// Cache the URI when mDoc is cleared.
nsCOMPtr<nsIURI> mDocumentURI; // strong
nsCOMPtr<nsIURI> mDocBaseURI; // strong
nsCOMPtr<mozilla::dom::EventTarget> mParentTarget; // strong