Closed Bug 1646491 Opened 4 years ago Closed 4 years ago

Figure out if the usage of nsContentUtils::GetRootDocument in FullscreenRoots is OK

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

RESOLVED FIXED
Fission Milestone M6b

People

(Reporter: kmag, Assigned: smacleod)

References

(Blocks 1 open bug)

Details

It's possible we have some other code that makes things work when OOP frames are involved, but I'm not sure.

Blocks: 1597439

Note this also includes use of functions like GetRootDocument, which does the same thing indirectly.

Fission Milestone: --- → M6b

Henri, could you look into figuring this out for Fission-compatibility?

Flags: needinfo?(hsivonen)

(hsivonen is on pto for couple weeks still, so I can look at this)

FullscreenChange doesn't have any GetInProcessParent usage. It is unclear to me what this bug is about.

Flags: needinfo?(hsivonen) → needinfo?(kmaglione+bmo)

(In reply to Olli Pettay [:smaug] from comment #3)

(hsivonen is on pto for couple weeks still, so I can look at this)

FullscreenChange doesn't have any GetInProcessParent usage. It is unclear to me what this bug is about.

I think the main issue is the use of nsContentUtils::GetRootDocument in the fullscreen code in Document.cpp, which uses GetInProcessParent indirectly, but there are also some direct usages: https://searchfox.org/mozilla-central/rev/82c04b9cad5b98bdf682bd477f2b1e3071b004ad/dom/base/Document.cpp#12995,13031

Flags: needinfo?(kmaglione+bmo)
Summary: Figure out if GetInProcessParent usage in FullscreenChange code is OK → Figure out if GetInProcess* usage in PendingFullscreenChangeList::Iterator code is OK

Alphan has been looking into Fullscreen Fission issues. I believe we can start with Alphan. Thank you. :)

Flags: needinfo?(alchen)
Assignee: nobody → alchen
Flags: needinfo?(alchen)
Blocks: 1619370

There are three parts for fullscreen code in Document.cpp.

I think the main issue is the use of nsContentUtils::GetRootDocument in the fullscreen code in Document.cpp, which uses GetInProcessParent indirectly,

  1. The usage of nsContentUtils::GetRootDocument in FullscreenRoots.
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/nsContentUtils.cpp#6596
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/Document.cpp#12934,12960,13200,13826,13924

but there are also some direct usages:

  1. The usage of GetInProcessRootTreeItem() and GetInProcessParent() in PendingFullscreenChangeList.
    https://searchfox.org/mozilla-central/rev/82c04b9cad5b98bdf682bd477f2b1e3071b004ad/dom/base/Document.cpp#12995,13031

  2. Here is the another usage of GetInProcessRootTreeItem.
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/Document.cpp#13765,13854

I will handle 2 and 3 in Bug 1585074.

Summary: Figure out if GetInProcess* usage in PendingFullscreenChangeList::Iterator code is OK → Figure out if the usage of nsContentUtils::GetRootDocument in FullscreenRoots is OK

There are three parts for fullscreen code in Document.cpp.

I think the main issue is the use of nsContentUtils::GetRootDocument in the fullscreen code in Document.cpp, which uses GetInProcessParent indirectly,

  1. The usage of nsContentUtils::GetRootDocument in FullscreenRoots.
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/nsContentUtils.cpp#6596
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/Document.cpp#12934,12960,13200,13826,13924

but there are also some direct usages:

  1. The usage of GetInProcessRootTreeItem() and GetInProcessParent() in PendingFullscreenChangeList.
    https://searchfox.org/mozilla-central/rev/82c04b9cad5b98bdf682bd477f2b1e3071b004ad/dom/base/Document.cpp#12995,13031

  2. Here is the another usage of GetInProcessRootTreeItem.
    https://searchfox.org/mozilla-central/rev/03794edd6edcc3fc1e222de966cb27256ce08998/dom/base/Document.cpp#13765,13854

I will handle 2 and 3 in Bug 1585074.

Assignee: alchen → smacleod
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: ETA: 9/10
Whiteboard: ETA: 9/10 → will confirm with new tests, ETA: 9/18

This is okay and working in fission due to Alphan's other changes. New tests have been added[1] to verify this and ensure things keep working.

[1] See Bug 1665941 and specifically D90940

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: will confirm with new tests, ETA: 9/18
Blocks: 1646516
You need to log in before you can comment on or make changes to this bug.