Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D39378
This commit is contained in:
Kannan Vijayan
2019-07-26 16:48:31 +00:00
parent 3f2302a751
commit c690c1925f
94 changed files with 532 additions and 447 deletions

View File

@@ -779,7 +779,7 @@ nsDocShell::LoadURI(nsDocShellLoadState* aLoadState) {
void nsDocShell::MaybeHandleSubframeHistory(nsDocShellLoadState* aLoadState) {
// First, verify if this is a subframe.
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
GetSameTypeParent(getter_AddRefs(parentAsItem));
GetInProcessSameTypeParent(getter_AddRefs(parentAsItem));
nsCOMPtr<nsIDocShell> parentDS(do_QueryInterface(parentAsItem));
if (!parentDS || parentDS == static_cast<nsIDocShell*>(this)) {
@@ -1212,7 +1212,7 @@ bool nsDocShell::SetCurrentURI(nsIURI* aURI, nsIRequest* aRequest,
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
if (root.get() == static_cast<nsIDocShellTreeItem*>(this)) {
// This is the root docshell
isRoot = true;
@@ -1852,7 +1852,7 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed) {
// If we have no parent then we're the root docshell; no ancestor of the
// original docshell doesn't have a allowfullscreen attribute, so
// report fullscreen as allowed.
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
if (!parent) {
*aFullscreenAllowed = true;
return NS_OK;
@@ -2215,7 +2215,7 @@ nsresult nsDocShell::Now(DOMHighResTimeStamp* aWhen) {
NS_IMETHODIMP
nsDocShell::SetWindowDraggingAllowed(bool aValue) {
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
if (!aValue && mItemType == typeChrome && !parent) {
// Window dragging is always allowed for top level
// chrome docshells.
@@ -2230,7 +2230,7 @@ nsDocShell::GetWindowDraggingAllowed(bool* aValue) {
// window dragging regions in CSS (-moz-window-drag:drag)
// can be slow. Default behavior is to only allow it for
// chrome top level windows.
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
if (mItemType == typeChrome && !parent) {
// Top level chrome window
*aValue = true;
@@ -2244,7 +2244,7 @@ nsIDOMStorageManager* nsDocShell::TopSessionStorageManager() {
nsresult rv;
nsCOMPtr<nsIDocShellTreeItem> topItem;
rv = GetSameTypeRootTreeItem(getter_AddRefs(topItem));
rv = GetInProcessSameTypeRootTreeItem(getter_AddRefs(topItem));
if (NS_FAILED(rv)) {
return nullptr;
}
@@ -2462,7 +2462,7 @@ nsDocShell::GetItemType(int32_t* aItemType) {
}
NS_IMETHODIMP
nsDocShell::GetParent(nsIDocShellTreeItem** aParent) {
nsDocShell::GetInProcessParent(nsIDocShellTreeItem** aParent) {
if (!mParent) {
*aParent = nullptr;
} else {
@@ -2473,7 +2473,14 @@ nsDocShell::GetParent(nsIDocShellTreeItem** aParent) {
return NS_OK;
}
already_AddRefed<nsDocShell> nsDocShell::GetParentDocshell() {
// With Fission, related nsDocShell objects may exist in a different process. In
// that case, this method will return `nullptr`, despite a parent nsDocShell
// object existing.
//
// Prefer using `BrowsingContext::Parent()`, which will succeed even if the
// parent entry is not in the current process, and handle the case where the
// parent nsDocShell is inaccessible.
already_AddRefed<nsDocShell> nsDocShell::GetInProcessParentDocshell() {
nsCOMPtr<nsIDocShell> docshell = do_QueryInterface(GetAsSupports(mParent));
return docshell.forget().downcast<nsDocShell>();
}
@@ -2534,7 +2541,7 @@ void nsDocShell::MaybeCreateInitialClientSource(nsIPrincipal* aPrincipal) {
mInitialClientSource->DocShellExecutionReady(this);
// Next, check to see if the parent is controlled.
nsCOMPtr<nsIDocShell> parent = GetParentDocshell();
nsCOMPtr<nsIDocShell> parent = GetInProcessParentDocshell();
nsPIDOMWindowOuter* parentOuter = parent ? parent->GetWindow() : nullptr;
nsPIDOMWindowInner* parentInner =
parentOuter ? parentOuter->GetCurrentInnerWindow() : nullptr;
@@ -2577,7 +2584,7 @@ Maybe<ClientInfo> nsDocShell::GetInitialClientInfo() const {
void nsDocShell::RecomputeCanExecuteScripts() {
bool old = mCanExecuteScripts;
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
// If we have no tree owner, that means that we've been detached from the
// docshell tree (this is distinct from having no parent docshell, which
@@ -2741,7 +2748,7 @@ void nsDocShell::MaybeClearStorageAccessFlag() {
}
NS_IMETHODIMP
nsDocShell::GetSameTypeParent(nsIDocShellTreeItem** aParent) {
nsDocShell::GetInProcessSameTypeParent(nsIDocShellTreeItem** aParent) {
NS_ENSURE_ARG_POINTER(aParent);
*aParent = nullptr;
@@ -2784,10 +2791,10 @@ nsDocShell::GetRootTreeItem(nsIDocShellTreeItem** aRootTreeItem) {
NS_ENSURE_ARG_POINTER(aRootTreeItem);
RefPtr<nsDocShell> root = this;
RefPtr<nsDocShell> parent = root->GetParentDocshell();
RefPtr<nsDocShell> parent = root->GetInProcessParentDocshell();
while (parent) {
root = parent;
parent = root->GetParentDocshell();
parent = root->GetInProcessParentDocshell();
}
root.forget(aRootTreeItem);
@@ -2795,17 +2802,18 @@ nsDocShell::GetRootTreeItem(nsIDocShellTreeItem** aRootTreeItem) {
}
NS_IMETHODIMP
nsDocShell::GetSameTypeRootTreeItem(nsIDocShellTreeItem** aRootTreeItem) {
nsDocShell::GetInProcessSameTypeRootTreeItem(
nsIDocShellTreeItem** aRootTreeItem) {
NS_ENSURE_ARG_POINTER(aRootTreeItem);
*aRootTreeItem = static_cast<nsIDocShellTreeItem*>(this);
nsCOMPtr<nsIDocShellTreeItem> parent;
NS_ENSURE_SUCCESS(GetSameTypeParent(getter_AddRefs(parent)),
NS_ENSURE_SUCCESS(GetInProcessSameTypeParent(getter_AddRefs(parent)),
NS_ERROR_FAILURE);
while (parent) {
*aRootTreeItem = parent;
NS_ENSURE_SUCCESS(
(*aRootTreeItem)->GetSameTypeParent(getter_AddRefs(parent)),
(*aRootTreeItem)->GetInProcessSameTypeParent(getter_AddRefs(parent)),
NS_ERROR_FAILURE);
}
NS_ADDREF(*aRootTreeItem);
@@ -2884,11 +2892,12 @@ bool nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem,
}
nsCOMPtr<nsIDocShellTreeItem> accessingRoot;
aAccessingItem->GetSameTypeRootTreeItem(getter_AddRefs(accessingRoot));
aAccessingItem->GetInProcessSameTypeRootTreeItem(
getter_AddRefs(accessingRoot));
nsCOMPtr<nsIDocShell> accessingRootDS = do_QueryInterface(accessingRoot);
nsCOMPtr<nsIDocShellTreeItem> targetRoot;
aTargetItem->GetSameTypeRootTreeItem(getter_AddRefs(targetRoot));
aTargetItem->GetInProcessSameTypeRootTreeItem(getter_AddRefs(targetRoot));
nsCOMPtr<nsIDocShell> targetRootDS = do_QueryInterface(targetRoot);
OriginAttributes targetOA =
@@ -2950,7 +2959,7 @@ bool nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem,
}
nsCOMPtr<nsIDocShellTreeItem> parent;
target->GetSameTypeParent(getter_AddRefs(parent));
target->GetInProcessSameTypeParent(getter_AddRefs(parent));
parent.swap(target);
} while (target);
@@ -3027,12 +3036,12 @@ nsDocShell::FindItemWithName(const nsAString& aName,
// a blank name himself.
return NS_OK;
} else if (aName.LowerCaseEqualsLiteral("_parent")) {
GetSameTypeParent(getter_AddRefs(foundItem));
GetInProcessSameTypeParent(getter_AddRefs(foundItem));
if (!foundItem) {
foundItem = this;
}
} else if (aName.LowerCaseEqualsLiteral("_top")) {
GetSameTypeRootTreeItem(getter_AddRefs(foundItem));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(foundItem));
NS_ASSERTION(foundItem, "Must have this; worst case it's us!");
} else {
// Do the search for item by an actual name.
@@ -3103,8 +3112,8 @@ nsresult nsDocShell::DoFindItemWithName(const nsAString& aName,
}
// If we have a same-type parent, respecting browser and app boundaries.
// NOTE: Could use GetSameTypeParent if the issues described in bug 1310344
// are fixed.
// NOTE: Could use GetInProcessSameTypeParent if the issues described in
// bug 1310344 are fixed.
if (!GetIsMozBrowser() && parentAsTreeItem->ItemType() == mItemType) {
return parentAsTreeItem->FindItemWithName(aName, this, aOriginalRequestor,
/* aSkipTabGroup = */ false,
@@ -3151,7 +3160,7 @@ bool nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell) {
// If aTargetDocShell has an ancestor, it is not top level.
nsCOMPtr<nsIDocShellTreeItem> ancestorOfTarget;
aTargetDocShell->GetSameTypeParent(getter_AddRefs(ancestorOfTarget));
aTargetDocShell->GetInProcessSameTypeParent(getter_AddRefs(ancestorOfTarget));
if (ancestorOfTarget) {
do {
// We are not sandboxed if we are an ancestor of target.
@@ -3159,7 +3168,8 @@ bool nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell) {
return false;
}
nsCOMPtr<nsIDocShellTreeItem> tempTreeItem;
ancestorOfTarget->GetSameTypeParent(getter_AddRefs(tempTreeItem));
ancestorOfTarget->GetInProcessSameTypeParent(
getter_AddRefs(tempTreeItem));
tempTreeItem.swap(ancestorOfTarget);
} while (ancestorOfTarget);
@@ -3180,7 +3190,7 @@ bool nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell) {
// from our top.
if (!(sandboxFlags & SANDBOXED_TOPLEVEL_NAVIGATION)) {
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
GetSameTypeRootTreeItem(getter_AddRefs(rootTreeItem));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(rootTreeItem));
if (SameCOMIdentity(aTargetDocShell, rootTreeItem)) {
return false;
}
@@ -3292,7 +3302,7 @@ nsDocShell::GetIsInUnload(bool* aIsInUnload) {
}
NS_IMETHODIMP
nsDocShell::GetChildCount(int32_t* aChildCount) {
nsDocShell::GetInProcessChildCount(int32_t* aChildCount) {
NS_ENSURE_ARG_POINTER(aChildCount);
*aChildCount = mChildList.Length();
return NS_OK;
@@ -3414,7 +3424,7 @@ nsDocShell::RemoveChild(nsIDocShellTreeItem* aChild) {
}
NS_IMETHODIMP
nsDocShell::GetChildAt(int32_t aIndex, nsIDocShellTreeItem** aChild) {
nsDocShell::GetInProcessChildAt(int32_t aIndex, nsIDocShellTreeItem** aChild) {
NS_ENSURE_ARG_POINTER(aChild);
#ifdef DEBUG
@@ -3664,7 +3674,7 @@ nsDocShell::GetUseGlobalHistory(bool* aUseGlobalHistory) {
NS_IMETHODIMP
nsDocShell::RemoveFromSessionHistory() {
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
nsCOMPtr<nsIWebNavigation> rootAsWebnav = do_QueryInterface(root);
if (!rootAsWebnav) {
return NS_OK;
@@ -4814,7 +4824,7 @@ nsDocShell::InitSessionHistory() {
// Make sure that we are the root DocShell, and set a handle to root docshell
// in the session history.
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
if (root != this) {
return NS_ERROR_FAILURE;
}
@@ -5327,7 +5337,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
// would make this test meaningless.
RefPtr<nsDocShell> docShell = this;
RefPtr<nsDocShell> parentItem = docShell->GetParentDocshell();
RefPtr<nsDocShell> parentItem = docShell->GetInProcessParentDocshell();
while (parentItem) {
// Null-check for crash in bug 267804
if (!parentItem->GetPresShell()) {
@@ -5358,7 +5368,7 @@ nsDocShell::GetVisibility(bool* aVisibility) {
}
docShell = parentItem;
parentItem = docShell->GetParentDocshell();
parentItem = docShell->GetInProcessParentDocshell();
}
nsCOMPtr<nsIBaseWindow> treeOwnerAsWin(do_QueryInterface(mTreeOwner));
@@ -5406,7 +5416,7 @@ nsDocShell::SetIsActive(bool aIsActive) {
// Update orientation when the top-level browsing context becomes active.
if (aIsActive) {
nsCOMPtr<nsIDocShellTreeItem> parent;
GetSameTypeParent(getter_AddRefs(parent));
GetInProcessSameTypeParent(getter_AddRefs(parent));
if (!parent) {
// We only care about the top-level browsing context.
uint16_t orientation = OrientationLock();
@@ -5556,7 +5566,7 @@ nsDocShell::SetMixedContentChannel(nsIChannel* aMixedContentChannel) {
if (aMixedContentChannel) {
// Get the root docshell.
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
NS_WARNING_ASSERTION(root.get() == static_cast<nsIDocShellTreeItem*>(this),
"Setting mMixedContentChannel on a docshell that is "
"not the root docshell");
@@ -5594,7 +5604,7 @@ nsDocShell::GetAllowMixedContentAndConnectionData(
*aIsRootDocShell = false;
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
NS_ASSERTION(
sameTypeRoot,
"No document shell root tree item from document shell tree item!");
@@ -5681,7 +5691,7 @@ nsDocShell::SetTitle(const nsAString& aTitle) {
mTitleValidForCurrentURI = true;
nsCOMPtr<nsIDocShellTreeItem> parent;
GetSameTypeParent(getter_AddRefs(parent));
GetInProcessSameTypeParent(getter_AddRefs(parent));
// When title is set on the top object it should then be passed to the
// tree owner.
@@ -6730,7 +6740,7 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
// Test whether this is the top frame or a subframe
bool isTopFrame = true;
nsCOMPtr<nsIDocShellTreeItem> targetParentTreeItem;
rv = GetSameTypeParent(getter_AddRefs(targetParentTreeItem));
rv = GetInProcessSameTypeParent(getter_AddRefs(targetParentTreeItem));
if (NS_SUCCEEDED(rv) && targetParentTreeItem) {
isTopFrame = false;
}
@@ -6774,7 +6784,7 @@ nsresult nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
// Parent window
nsCOMPtr<nsIDocShellTreeItem> parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
GetInProcessSameTypeParent(getter_AddRefs(parentItem));
if (!parentItem) {
return NS_OK;
}
@@ -7015,7 +7025,7 @@ nsresult nsDocShell::EnsureContentViewer() {
nsIPrincipal* principal = GetInheritedPrincipal(false);
nsIPrincipal* storagePrincipal = GetInheritedPrincipal(false, true);
nsCOMPtr<nsIDocShellTreeItem> parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
GetInProcessSameTypeParent(getter_AddRefs(parentItem));
if (parentItem) {
if (nsCOMPtr<nsPIDOMWindowOuter> domWin = GetWindow()) {
nsCOMPtr<Element> parentElement = domWin->GetFrameElementInternal();
@@ -7266,7 +7276,7 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
// Don't cache the content viewer if we're in a subframe.
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeParent(getter_AddRefs(root));
GetInProcessSameTypeParent(getter_AddRefs(root));
if (root && root != this) {
return false; // this is a subframe load
}
@@ -7902,7 +7912,7 @@ nsresult nsDocShell::RestoreFromHistory() {
}
if (document) {
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
if (parent) {
RefPtr<Document> d = parent->GetDocument();
if (d) {
@@ -8314,7 +8324,7 @@ nsresult nsDocShell::CreateContentViewer(const nsACString& aContentType,
RefPtr<Document> newDoc = viewer->GetDocument();
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
nsCOMPtr<nsIPrincipal> parentPrincipal =
parent->GetDocument()->NodePrincipal();
nsCOMPtr<nsIPrincipal> thisPrincipal = newDoc->NodePrincipal();
@@ -8445,7 +8455,7 @@ nsresult nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer) {
DoGetPositionAndSize(&x, &y, &cx, &cy);
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
NS_ENSURE_SUCCESS(GetSameTypeParent(getter_AddRefs(parentAsItem)),
NS_ENSURE_SUCCESS(GetInProcessSameTypeParent(getter_AddRefs(parentAsItem)),
NS_ERROR_FAILURE);
nsCOMPtr<nsIDocShell> parent(do_QueryInterface(parentAsItem));
@@ -8642,7 +8652,7 @@ nsresult nsDocShell::CheckLoadingPermissions() {
}
nsCOMPtr<nsIDocShellTreeItem> tmp;
item->GetSameTypeParent(getter_AddRefs(tmp));
item->GetInProcessSameTypeParent(getter_AddRefs(tmp));
item.swap(tmp);
} while (item);
@@ -9440,7 +9450,7 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
// If this docshell is owned by a frameloader, make sure to cancel
// possible frameloader initialization before loading a new page.
nsCOMPtr<nsIDocShellTreeItem> parent = GetParentDocshell();
nsCOMPtr<nsIDocShellTreeItem> parent = GetInProcessParentDocshell();
if (parent) {
RefPtr<Document> doc = parent->GetDocument();
if (doc) {
@@ -9628,7 +9638,7 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
if (OrientationLock() != hal::eScreenOrientation_None) {
#ifdef DEBUG
nsCOMPtr<nsIDocShellTreeItem> parent;
GetSameTypeParent(getter_AddRefs(parent));
GetInProcessSameTypeParent(getter_AddRefs(parent));
MOZ_ASSERT(!parent);
#endif
SetOrientationLock(hal::eScreenOrientation_None);
@@ -9781,7 +9791,7 @@ nsIPrincipal* nsDocShell::GetInheritedPrincipal(
if (!document) {
nsCOMPtr<nsIDocShellTreeItem> parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
GetInProcessSameTypeParent(getter_AddRefs(parentItem));
if (parentItem) {
document = parentItem->GetDocument();
}
@@ -11575,7 +11585,7 @@ nsresult nsDocShell::AddToSessionHistory(
// Get a handle to the root docshell
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
/*
* If this is a LOAD_FLAGS_REPLACE_HISTORY in a subframe, we use
* the existing SH entry in the page and replace the url and
@@ -11969,7 +11979,7 @@ void nsDocShell::SetHistoryEntry(nsCOMPtr<nsISHEntry>* aPtr,
nsCOMPtr<nsISHEntry> oldRootEntry = nsSHistory::GetRootSHEntry(*aPtr);
if (oldRootEntry) {
nsCOMPtr<nsIDocShellTreeItem> rootAsItem;
GetSameTypeRootTreeItem(getter_AddRefs(rootAsItem));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(rootAsItem));
nsCOMPtr<nsIDocShell> rootShell = do_QueryInterface(rootAsItem);
if (rootShell) { // if we're the root just set it, nothing to swap
nsSHistory::SwapEntriesData data = {this, newRootEntry};
@@ -11991,7 +12001,7 @@ void nsDocShell::SetHistoryEntry(nsCOMPtr<nsISHEntry>* aPtr,
already_AddRefed<ChildSHistory> nsDocShell::GetRootSessionHistory() {
nsCOMPtr<nsIDocShellTreeItem> root;
nsresult rv = GetSameTypeRootTreeItem(getter_AddRefs(root));
nsresult rv = GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
if (NS_WARN_IF(NS_FAILED(rv))) {
return nullptr;
}
@@ -12503,7 +12513,7 @@ NS_IMETHODIMP
nsDocShell::GetTopWindow(mozIDOMWindowProxy** aWindow) {
nsCOMPtr<nsPIDOMWindowOuter> win = GetWindow();
if (win) {
win = win->GetTop();
win = win->GetInProcessTop();
}
win.forget(aWindow);
return NS_OK;
@@ -12517,7 +12527,7 @@ nsDocShell::GetTopFrameElement(Element** aElement) {
return NS_OK;
}
nsCOMPtr<nsPIDOMWindowOuter> top = win->GetScriptableTop();
nsCOMPtr<nsPIDOMWindowOuter> top = win->GetInProcessScriptableTop();
NS_ENSURE_TRUE(top, NS_ERROR_FAILURE);
// GetFrameElementInternal, /not/ GetScriptableFrameElement -- if |top| is
@@ -12546,7 +12556,7 @@ nsDocShell::GetUseTrackingProtection(bool* aUseTrackingProtection) {
return NS_OK;
}
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
if (parent) {
return parent->GetUseTrackingProtection(aUseTrackingProtection);
}
@@ -13175,7 +13185,7 @@ uint32_t nsDocShell::GetInheritedFrameType() {
}
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
GetSameTypeParent(getter_AddRefs(parentAsItem));
GetInProcessSameTypeParent(getter_AddRefs(parentAsItem));
nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
if (!parent) {
@@ -13219,7 +13229,7 @@ NS_IMETHODIMP nsDocShell::GetIsTopLevelContentDocShell(
if (mItemType == typeContent) {
nsCOMPtr<nsIDocShellTreeItem> root;
GetSameTypeRootTreeItem(getter_AddRefs(root));
GetInProcessSameTypeRootTreeItem(getter_AddRefs(root));
*aIsTopLevelContentDocShell =
root.get() == static_cast<nsIDocShellTreeItem*>(this);
}
@@ -13279,7 +13289,7 @@ bool nsDocShell::ServiceWorkerAllowedToControlWindow(nsIPrincipal* aPrincipal,
}
nsCOMPtr<nsIDocShellTreeItem> parent;
GetSameTypeParent(getter_AddRefs(parent));
GetInProcessSameTypeParent(getter_AddRefs(parent));
nsPIDOMWindowOuter* parentOuter = parent ? parent->GetWindow() : nullptr;
nsPIDOMWindowInner* parentInner =
parentOuter ? parentOuter->GetCurrentInnerWindow() : nullptr;
@@ -13403,14 +13413,14 @@ nsDocShell::GetAsyncPanZoomEnabled(bool* aOut) {
}
bool nsDocShell::HasUnloadedParent() {
RefPtr<nsDocShell> parent = GetParentDocshell();
RefPtr<nsDocShell> parent = GetInProcessParentDocshell();
while (parent) {
bool inUnload = false;
parent->GetIsInUnload(&inUnload);
if (inUnload) {
return true;
}
parent = parent->GetParentDocshell();
parent = parent->GetInProcessParentDocshell();
}
return false;
}
@@ -13519,7 +13529,7 @@ bool nsDocShell::InFrameSwap() {
if (shell->mInFrameSwap) {
return true;
}
shell = shell->GetParentDocshell();
shell = shell->GetInProcessParentDocshell();
} while (shell);
return false;
}
@@ -13574,7 +13584,7 @@ nsDocShell::GetIsOnlyToplevelInTabGroup(bool* aResult) {
// If we are not toplevel then we are not the only toplevel window in the
// tab group.
if (outer->GetScriptableParentOrNull()) {
if (outer->GetInProcessScriptableParentOrNull()) {
*aResult = false;
return NS_OK;
}