Fix service workers openWindow when there's no available browser window
Categories
(Core :: DOM: Service Workers, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | wontfix |
People
(Reporter: catalinb, Assigned: saschanaz)
References
Details
Attachments
(5 files, 1 obsolete file)
Updated•10 years ago
|
| Reporter | ||
Comment 1•10 years ago
|
||
| Reporter | ||
Updated•10 years ago
|
| Reporter | ||
Comment 2•10 years ago
|
||
| Reporter | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
| Reporter | ||
Comment 8•10 years ago
|
||
| Reporter | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
| Reporter | ||
Updated•10 years ago
|
Comment 11•10 years ago
|
||
| bugherder | ||
Updated•8 years ago
|
| Reporter | ||
Comment 12•8 years ago
|
||
Updated•8 years ago
|
| Assignee | ||
Comment 13•1 year ago
|
||
This is not fixed, we certainly has a TODO comment referring to this bug https://searchfox.org/mozilla-central/rev/f571db8014431de31d245017e2f5457046aec4ea/dom/clients/manager/ClientOpenWindowUtils.cpp#222
// Find the most recent browser window and open a new tab in it.
nsCOMPtr<nsPIDOMWindowOuter> browserWindow =
nsContentUtils::GetMostRecentNonPBWindow();
if (!browserWindow) {
// It is possible to be running without a browser window on Mac OS, so
// we need to open a new chrome window.
// TODO(catalinb): open new chrome window. Bug 1218080
aRv.ThrowTypeError("Unable to open window");
return;
}
| Assignee | ||
Comment 15•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 16•1 year ago
|
||
| Assignee | ||
Comment 17•1 year ago
|
||
This allows nsOpenWindowInfo to be automatically detected as nsIOpenWindowInfo from JS without extra QueryInterface.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 18•1 year ago
|
||
Comment 19•1 year ago
|
||
| bugherder | ||
Comment 20•1 year ago
|
||
Comment 21•1 year ago
|
||
Comment 22•1 year ago
•
|
||
Backed out for causing a spike in wpt crashes on windows.
- Backout link
- Push with failures
- Failure Log @backdrop-invalidation.html
- Failure Log @svglength-animation-values.html
- Failure Log @018.html?wss
| Assignee | ||
Comment 23•1 year ago
|
||
But those tests have nothing to do with my patch?
Comment 24•1 year ago
|
||
They do not look directly related but on tree we have a bunch of new failures lines with TEST-UNEXPECTED-CRASH since those changes. Might be something from the service workers changes that is triggering them.
You can clearly see the spike in oranges from this link.
| Assignee | ||
Comment 25•1 year ago
•
|
||
Yeah but I'm confused, this function would only called by parent process, not the content process, and only by service workers and notifications. And it's the content process that is crashing in tests that have nothing to do with service worker nor notification. Actually WPT doesn't even cover that part at all at this point, because we just don't have test infra to do that.
The fact that there's no crash stack confuses me even more.
Andrew, do you see anything obvious that can cause crash here?
| Assignee | ||
Comment 26•1 year ago
|
||
This was the try run before landing https://treeherder.mozilla.org/jobs?repo=try&revision=4775d33ec3383daeea256707e2667b70fa818b06, I tried adding WPT runs there.
Comment 27•1 year ago
•
|
||
I added a ton of wpt tests to the linux jobs on the try run too in the hope that they reproduce there so we can use rr/pernosco. I'll take another look when they're done. (Aside: the treeherder auth mechanism has a real problem where treeherder thinks I'm logged in but whatever auth job-triggering has does not and it goes on a tab-opening spree.)
| Assignee | ||
Comment 28•1 year ago
|
||
Also can see Linux failure here: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception%2Cusercancel&revision=bb69930c46e26e677f9b857f5494ee1f0602bdf0&selectedTaskRun=Lh9xOTRLSn2b84q_mZvjCQ.0
But Pernosco has never sent any resulting email to me recently when I trigger it, so maybe you have better chance...
| Assignee | ||
Comment 29•1 year ago
|
||
Wait, those Linux failures are all general non-crash failures??
| Assignee | ||
Comment 30•1 year ago
|
||
Submitted only with the part 1 patch, as I have no idea how part 2 can affect WPT. https://treeherder.mozilla.org/jobs?repo=try&revision=f8699dd969cf58b26d1b1c0a255743ccb317accd
| Assignee | ||
Comment 31•1 year ago
|
||
Ok, this is the try run with only part 1 with full WPT jobs: https://treeherder.mozilla.org/jobs?repo=try&revision=8b79b0c3d5ffb39426dca143a20582461838d90c
So many failures. Seems part 1 is the problem.
| Assignee | ||
Comment 32•1 year ago
|
||
This is an interesting Android crash that is fortunately with an actual crash stack: https://treeherder.mozilla.org/logviewer?job_id=513686227&repo=try&lineNumber=4326
[task 2025-06-18T01:15:46.630+00:00] 01:15:46 INFO - PROCESS-CRASH | MOZ_ASSERT(false) (GeckoView should use nsIBrowserDOMWindow instead) [@ nsWindowWatcher::OpenWindowWithRemoteTab] | /html/browsers/the-window-object/open-close/open-features-tokenization-noreferrer.html
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Thread 11 Gecko (crashed) - tid: 12150
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 0 libxul.so!MOZ_CrashSequence(void*, long) [Assertions.h:8b79b0c3d5ffb39426dca143a20582461838d90c : 248]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: inlining
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 1 libxul.so!nsWindowWatcher::OpenWindowWithRemoteTab(nsIRemoteTab*, mozilla::dom::WindowFeatures const&, mozilla::dom::UserActivation::Modifiers const&, bool, float, nsIOpenWindowInfo*, nsIRemoteTab**) [nsWindowWatcher.cpp:8b79b0c3d5ffb39426dca143a20582461838d90c : 487 + 0x5]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rax = 0x0000000000000000 rdx = 0x0000000000000001
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rcx = 0x00000000000001e7 rbx = 0x0000000000000001
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rsi = 0x0000070fbb180395 rdi = 0x0000775272cefdd4
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rbp = 0x00007752603647b0 rsp = 0x00007752603647b0
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r8 = 0x0000000000002f76 r9 = 0x00007752603c6450
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r10 = 0x0000000000000000 r11 = 0x0000000000000246
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r12 = 0x0000000000000000 r13 = 0x0000775260364a10
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r14 = 0x000077525f845b88 r15 = 0x000077523c4c5f98
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rip = 0x0000775258b86d64
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: given as instruction pointer in context
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 2 libxul.so!mozilla::dom::ContentParent::CommonCreateWindow(mozilla::dom::PBrowserParent*, mozilla::dom::BrowsingContext&, bool, unsigned int const&, bool const&, bool const&, bool const&, bool const&, nsIURI*, nsTSubstring<char> const&, mozilla::dom::UserActivation::Modifiers const&, mozilla::dom::BrowserParent*, nsTSubstring<char16_t> const&, nsresult&, nsCOMPtr<nsIRemoteTab>&, bool*, int&, nsIPrincipal*, nsIReferrerInfo*, bool, nsIContentSecurityPolicy*, mozilla::OriginAttributes const&, bool, bool) [ContentParent.cpp:8b79b0c3d5ffb39426dca143a20582461838d90c : 5323 + 0x25]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rbx = 0x0000000000000001 rbp = 0x0000775260364940
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rsp = 0x00007752603647c0 r12 = 0x0000000000000000
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r13 = 0x0000775260364a10 r14 = 0x000077525f845b88
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r15 = 0x000077523c4c5f98 rip = 0x0000775257522a92
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: call frame info
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 3 libxul.so!mozilla::dom::ContentParent::RecvCreateWindowInDifferentProcess(mozilla::dom::PBrowserParent*, mozilla::dom::MaybeDiscarded<mozilla::dom::BrowsingContext> const&, unsigned int const&, bool const&, bool const&, nsIURI*, nsTSubstring<char> const&, mozilla::dom::UserActivation::Modifiers const&, nsTSubstring<char16_t> const&, nsIPrincipal*, nsIContentSecurityPolicy*, nsIReferrerInfo*, mozilla::OriginAttributes const&, bool, bool) [ContentParent.cpp:8b79b0c3d5ffb39426dca143a20582461838d90c : 5560 + 0x4a]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rbx = 0x000077523be1fc00 rbp = 0x0000775260364b30
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rsp = 0x0000775260364950 r12 = 0x000077523dc90e00
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r13 = 0x0000775260364d88 r14 = 0x0000775260364a10
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r15 = 0x0000775260364cd9 rip = 0x00007752575245fd
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: call frame info
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 4 libxul.so!mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&) [PContentParent.cpp: : 10736 + 0x68]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rbx = 0x000077523dc90e00 rbp = 0x0000775260365dc0
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rsp = 0x0000775260364b40 r12 = 0x0000775260364d50
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r13 = 0x0000775260364db8 r14 = 0x0000775260365d28
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r15 = 0x0000775260365c18 rip = 0x00007752576412b7
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: call frame info
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - 5 libxul.so!mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) [MessageChannel.cpp:8b79b0c3d5ffb39426dca143a20582461838d90c : 1795 + 0x8]
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rbx = 0x0000775242d3d670 rbp = 0x0000775260365e30
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - rsp = 0x0000775260365dd0 r12 = 0x000077523e960ac0
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r13 = 0x0000000000000001 r14 = 0x000077523dc90e90
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - r15 = 0x0000000000000001 rip = 0x0000775253975e89
[task 2025-06-18T01:15:46.631+00:00] 01:15:46 INFO - Found by: call frame info
| Assignee | ||
Comment 33•1 year ago
|
||
That wasn't reproducible locally though. With /navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html I can repro 100% but I'm not getting a human readable crash stack. π€
| Assignee | ||
Comment 34•1 year ago
•
|
||
As I first guessed, I think this is not me. /navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html already crashes on the main branch when ran alone.
| Assignee | ||
Comment 35•1 year ago
•
|
||
That was a red herring. I can't repro this locally... Another try push with latest main branch: https://treeherder.mozilla.org/jobs?repo=try&revision=ba273e7229a85e679838d74afde27c06512de1b8
| Assignee | ||
Comment 36•1 year ago
|
||
Comment #32 is related to bug 1941334. (Thanks Andrew)
| Assignee | ||
Comment 37•1 year ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #35)
That was a red herring. I can't repro this locally... Another try push with latest main branch: https://treeherder.mozilla.org/jobs?repo=try&revision=ba273e7229a85e679838d74afde27c06512de1b8
At this point I wonder this is a compiler issue, as the crash only happens on Windows opt build π€
Another run for all platforms on today's main branch: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=138114
| Assignee | ||
Comment 38•1 year ago
|
||
Slight noop change to the patch removed the crashes. π€·π»ββοΈ https://treeherder.mozilla.org/jobs?repo=try&revision=29c9f47d10d46a9ecacd75986fa6277610270f94
Comment 39•1 year ago
|
||
Comment 40•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 41•1 year ago
|
||
π
Description
•