Bug 1616991 - Rename WindowGlobalChild::WindowGlobal getter to reflect nullability, r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D64660
This commit is contained in:
Nika Layzell
2020-03-23 23:03:50 +00:00
parent 73280728ea
commit 1bd6d66011
4 changed files with 5 additions and 5 deletions

View File

@@ -6630,7 +6630,7 @@ nsresult nsDocShell::CreateContentViewerForActor(
MOZ_ASSERT(
doc,
"Should have a document if CreateAboutBlankContentViewer succeeded");
MOZ_ASSERT(doc->GetOwnerGlobal() == aWindowActor->WindowGlobal(),
MOZ_ASSERT(doc->GetOwnerGlobal() == aWindowActor->GetWindowGlobal(),
"New document should be in the same global as our actor");
// FIXME: We may want to support non-initial documents here.

View File

@@ -115,7 +115,7 @@ Document* JSWindowActorChild::GetDocument(ErrorResult& aRv) {
return nullptr;
}
nsGlobalWindowInner* window = mManager->WindowGlobal();
nsGlobalWindowInner* window = mManager->GetWindowGlobal();
return window ? window->GetDocument() : nullptr;
}

View File

@@ -270,7 +270,7 @@ mozilla::ipc::IPCResult WindowGlobalChild::RecvMakeFrameLocal(
return IPC_OK();
}
if (NS_WARN_IF(embedderElt->GetOwnerGlobal() != WindowGlobal())) {
if (NS_WARN_IF(embedderElt->GetOwnerGlobal() != GetWindowGlobal())) {
return IPC_OK();
}
@@ -327,7 +327,7 @@ mozilla::ipc::IPCResult WindowGlobalChild::RecvMakeFrameRemote(
return IPC_OK();
}
if (NS_WARN_IF(embedderElt->GetOwnerGlobal() != WindowGlobal())) {
if (NS_WARN_IF(embedderElt->GetOwnerGlobal() != GetWindowGlobal())) {
BrowserBridgeChild::Send__delete__(bridge);
return IPC_OK();
}

View File

@@ -49,7 +49,7 @@ class WindowGlobalChild final : public WindowGlobalActor,
dom::BrowsingContext* BrowsingContext() override { return mBrowsingContext; }
dom::WindowContext* WindowContext() { return mWindowContext; }
nsGlobalWindowInner* WindowGlobal() { return mWindowGlobal; }
nsGlobalWindowInner* GetWindowGlobal() { return mWindowGlobal; }
// Has this actor been shut down
bool IsClosed() { return !CanSend(); }