Closed Bug 1594283 Opened 5 years ago Closed 4 years ago

Fix usage of nsIDocShellTreeItem in nsDocShell::GetSameTypeParentIgnoreBrowserBoundaries

Categories

(Core :: DOM: Navigation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Fission Milestone M6
Tracking Status
firefox77 --- fixed

People

(Reporter: djvj, Assigned: tetsuharu)

References

(Blocks 1 open bug)

Details

(Whiteboard: [rm-docshell-tree-item:rename])

Attachments

(2 files, 1 obsolete file)

https://searchfox.org/mozilla-central/rev/8b7aa8af652f87d39349067a5bc9c0256bf6dedc/docshell/base/nsDocShell.cpp#2812

Assumes parent is in-process. Needs to be renamed "GetSameTypeInProcessParentIgnoreBrowserBoundaries", and callers changed to reflect naming.

Then audited for uses and checked to ensure that either this is only called on docshells with in-process parents, or that a null return value in the out-of-process parent case is handled.

Tentatively moving all bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to the "?" triage milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → ?
Fission Milestone: ? → M6
Priority: -- → P2

We can remove these methods since nsGlobalWindowOuter::GetInProcessParent() is only user for GetSameTypeParentIgnoreBrowserBoundaries().

Assignee: nobody → tetsuharu.ohzeki
Status: NEW → ASSIGNED

(In reply to Tetsuharu OHZEKI [:tetsuharu] (UTC+9) from comment #2)

We can remove these methods since nsGlobalWindowOuter::GetSameTypeRootTreeItemIgnoreBrowserBoundaries() is only user for GetSameTypeParentIgnoreBrowserBoundaries().

For GetSameTypeParentIgnoreBrowserBoundaries(), I jumped to conclusions.
nsIDocShellTreeItem.itemType has multiple implementations nsWebBrowser::ItemType and nsDocShell::ItemType, so it might not only be chrome or content. We may get ride of GetSameTypeParentIgnoreBrowserBoundaries(), but I seem it requires more careful works to check whether actual nsIDocShellTreeItem is nsWebBrowser or nsDocShell if we remove it before we get ride of all of comparing to nsIDocShellTreeItem::typeChrome or nsIDocShellTreeItem::typeContent.

So I think it's better to rename GetSameTypeParentIgnoreBrowserBoundaries() to GetSameTypeInProcessParentIgnoreBrowserBoundaries or other names conservatively.

Attachment #9134179 - Attachment is obsolete: true
Pushed by tetsuharu.ohzeki@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/0fa92481a0ad
part 1: Remove nsIDocShell::GetSameTypeRootTreeItemIgnoreBrowserBoundaries(). r=kmag
https://hg.mozilla.org/integration/autoland/rev/34d7fcc41ba9
part 2: Rename nsIDocShell::GetSameTypeParentIgnoreBrowserBoundaries to nsIDocShell::GetSameTypeInProcessParentIgnoreBrowserBoundaries. r=kmag
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: