Closed Bug 1660968 Opened 5 years ago Closed 5 years ago

Remove uses of GetInProcessScriptableTop in WebSocketImpl::GetLoadingPrincipal

Categories

(Core :: DOM: Networking, task, P1)

task

Tracking

()

RESOLVED FIXED
84 Branch
Fission Milestone M6c
Tracking Status
firefox-esr68 --- disabled
firefox-esr78 --- disabled
firefox79 --- disabled
firefox80 --- disabled
firefox81 --- disabled
firefox82 --- disabled
firefox83 --- disabled
firefox84 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1646545 +++

It's used in a bunch of places, mostly (though not always) just to get the top inner window ID. That can be done (and more correctly) using WindowContext instead. I'm not sure what needs to happen with the other uses.

Code link

Flags: needinfo?(amarchesini)

This code has to be removed/changed for fission. I suspect that the work for window.name could be useful here.
I suggest adding a 'has-opener' boolean flag in Window context. Tim, does it make sense to you? And does the window.name work be useful here?

Depends on: 444222
Flags: needinfo?(amarchesini) → needinfo?(tihuang)

It makes sense to me to add a has-opener boolean flag in window context. And I guess we will implement this in bug 444222 because we want to know if a window has an opener regardless if the opener has been set by script.

Flags: needinfo?(tihuang)

Note: The GetInProcessScriptableTop usage in this function can probably just be changed to parentWindow->BrowsingContext()->Top() == innerWindow->GetBrowsingContext()->Top(). The GetInProcessScriptableParent() usage may be Fission-compatible, but it's somewhat unusual, so I'm not sure.

Jens, this is P1. Please find an owner for this and fixing this for M6c soon.

Flags: needinfo?(jstutte)
Assignee: nobody → valentin.gosu

This change also simplifies the code a bit.
Also, as BrowsingContext::GetOpener returns null when there's no opener,
we don't have to check whether the opener and innerWindow are the same.

Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/363cbf5310a8 Remove uses of GetInProcessScriptableTop in WebSocketImpl::GetLoadingPrincipal r=baku
Flags: needinfo?(jstutte)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: