Fix GetInProcessTop usage in nsAutoSyncOperation
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: kmag, Assigned: u608768)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [2/8] In autoland)
Attachments
(1 file, 5 obsolete files)
It's possible that we only need to in-process windows when we're blocking for a sync operation, but we definitely need to correctly handle the case where the top window is not in the same process as the window that enters the sync operation, and when there are OOP interstitials with in-process descendants.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
assign to kmag for M6c
Updated•4 years ago
|
Comment 2•4 years ago
|
||
As kmag is expecting here, we probably don't need to do any cross-process work here, as we're only working with the in-process documents. We can possibly get away with grabbing our BrowsingContextGroup, and recursively iterating over every BrowsingContext, setting them as in a sync operation if they're in-process.
The document at https://bugzilla.mozilla.org/attachment.cgi?id=9168619 has two processes. The toplevel document and double-nested frame are in the same process. In Firefox, both with and without fission, opening an alert in any of the three frames suspends all intervals. Chrome only suspends intervals for the process that the alert was opened for (eg., opening the alert in either the toplevel or double-nested frame will not pause the middle frame's counter, and opening the alert in the middle frame will not pause the interval in the other two frames).
I'm still seeing comment 6 with the changes from comment 2. It appears someone else is suspending the timeout:
-
The toplevel browser element sends a "EnterModalState" to all process roots here.
-
The middle frame receives that message and calls
nsDOMWindowUtils::EnterModalState()
, and we eventually suspend the timeout in that process:#0 mozilla::dom::TimeoutManager::Suspend() at /home/kashav/src/hg.mozilla.org/mozilla-central/dom/base/TimeoutManager.cpp:1145 #1 nsGlobalWindowInner::Suspend() at /home/kashav/src/hg.mozilla.org/mozilla-central/dom/base/nsGlobalWindowInner.cpp:5272 #2 nsGlobalWindowOuter::EnterModalState() at /home/kashav/src/hg.mozilla.org/mozilla-central/dom/base/nsGlobalWindowOuter.cpp:6280 #3 nsDOMWindowUtils::EnterModalState() at /home/kashav/src/hg.mozilla.org/mozilla-central/dom/base/nsDOMWindowUtils.cpp:2111 ...
I should probably find something that will actually be fixed by making nsAutoSyncOperation work with fission...
(In reply to :kashav from comment #7)
I should probably find something that will actually be fixed by making nsAutoSyncOperation work with fission...
I was able to get this to work using MutationObservers. While in an nsAutoSyncOperation, we block mutation notifications for toplevel documents, but don't block them for in-process descendants which have out-of-process ancestors.
This makes it so we that correctly set nsIGlobalObject::IsInSyncOperation for
in-process descendant frames that have out-of-process ancestors.
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D86860
Assignee | ||
Comment 11•4 years ago
|
||
Comment on attachment 9168622 [details]
b.html
Will file a followup for the timeout compat bugs.
Comment 12•3 years ago
|
||
Steven said he can finish up Kashav's patches - thanks Steven!
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
This makes it so that we correctly set nsIGlobalObject::IsInSyncOperation
for in-process descendant frames that have out-of-process ancestors.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•3 years ago
|
||
Pushed by kmadan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a911e7cbb478 Fix GetInProcessTop usage in nsAutoSyncOperation, r=kmag
Comment 15•3 years ago
|
||
Backout by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b4768398204a Backed out changeset a911e7cbb478 for open-features-negative-innerwidth-innerheight.html failures CLOSED TREE
Comment 16•3 years ago
|
||
Backed out changeset a911e7cbb478 (bug 1646498) for open-features-negative-innerwidth-innerheight.html failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/b4768398204a406b9847f6a83f6404f1e03827fb
Failure log: https://treeherder.mozilla.org/logviewer?job_id=327860748&repo=autoland&lineNumber=4263
...
[task 2021-01-26T19:53:34.872Z] 19:53:34 INFO - TEST-START | /intersection-observer/multiple-targets.html
[task 2021-01-26T19:53:34.873Z] 19:53:34 INFO - Closing window 79
[task 2021-01-26T19:53:35.137Z] 19:53:35 INFO - .....
[task 2021-01-26T19:53:35.137Z] 19:53:35 INFO - TEST-OK | /intersection-observer/multiple-targets.html | took 266ms
[task 2021-01-26T19:53:35.138Z] 19:53:35 INFO - TEST-START | /intersection-observer/multiple-thresholds.html
[task 2021-01-26T19:53:35.139Z] 19:53:35 INFO - Closing window 81
[task 2021-01-26T19:53:35.543Z] 19:53:35 INFO -
[task 2021-01-26T19:53:35.543Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | features "innerwidth=-404" should NOT set "width=404" - Test timed out
[task 2021-01-26T19:53:35.544Z] 19:53:35 INFO -
[task 2021-01-26T19:53:35.544Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | features "innerwidth=-404.5" should NOT set "width=404" - Test timed out
[task 2021-01-26T19:53:35.546Z] 19:53:35 INFO -
[task 2021-01-26T19:53:35.546Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | features "innerwidth=-404e1" should NOT set "width=404" - Test timed out
[task 2021-01-26T19:53:35.548Z] 19:53:35 INFO -
[task 2021-01-26T19:53:35.548Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | features "innerheight=-404" should NOT set "height=404" - Test timed out
[task 2021-01-26T19:53:35.550Z] 19:53:35 INFO -
[task 2021-01-26T19:53:35.550Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | features "innerheight=-404.5" should NOT set "height=404" - Test timed out
[task 2021-01-26T19:53:35.552Z] 19:53:35 INFO - TEST-UNEXPECTED-TIMEOUT | /html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html | expected OK
[task 2021-01-26T19:53:35.552Z] 19:53:35 INFO - TEST-INFO took 60551ms
[task 2021-01-26T19:53:35.555Z] 19:53:35 INFO - PID 5864 | 1611690815555 Marionette INFO Stopped listening on port 51296
Comment 17•3 years ago
|
||
Could you, please, also take a look at these intermittent crashes? Could them be caused by the backed out changes?
https://treeherder.mozilla.org/logviewer?job_id=327864078&repo=autoland&lineNumber=4725
Assignee | ||
Comment 18•3 years ago
|
||
(In reply to Bogdan Tara[:bogdan_tara | bogdant] from comment #17)
Could you, please, also take a look at these intermittent crashes? Could them be caused by the backed out changes?
https://treeherder.mozilla.org/logviewer?job_id=327864078&repo=autoland&lineNumber=4725
They were, sorry for the noise. Looking at the failures.
Assignee | ||
Comment 19•3 years ago
|
||
Failing WPTs appear to be fixed: https://treeherder.mozilla.org/jobs?repo=try&revision=8f4fa4d773cfbb9e034e877808c40c8a9a6bde91.
The intermittent crashes should be fixed too, but still have to verify.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 20•3 years ago
|
||
Pushed by kmadan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/90879d7de4f5 Fix GetInProcessTop usage in nsAutoSyncOperation, r=kmag
Updated•3 years ago
|
Comment 21•3 years ago
|
||
bugherder |
Description
•