will-navigate doesn't fire and previous target isn't destroyed when navigating away from a bfcached *and* paused page
Categories
(DevTools :: Framework, defect)
Tracking
(Not tracked)
People
(Reporter: ochameau, Unassigned)
References
Details
(Whiteboard: dt-fission-future, dt-perf-stability-mvp)
When navigating away from a page that is paused and we are navigating to a page that was stored in the bfcache, we at least miss:
-
DOCUMENT_EVENT's will-navigate.
That's becauseParentDocumentEventWatcher
'sonStateChange
:
https://searchfox.org/mozilla-central/rev/59e797b66f5ce8a27ede0e7677688931be7aed20/devtools/server/actors/resources/parent-process-document-event.js#76
is not called when doing such navigation. Whereas it should be. When the page isn't paused it is correctly called. At first sight, it doesn't seem to be called at all. -
previous target of the page that is paused from which we navigate from is not reported as destroyed by the server.
That's because DevToolsFrameChild.jsm'shandleEvent
:
https://searchfox.org/mozilla-central/rev/59e797b66f5ce8a27ede0e7677688931be7aed20/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#525
correctly receives apagehide
event, but itspersisted
attribute is false, whereas we would have expected it to be true. Because of that, we don't consider it as a bfcache navigation and do not destroy the target. And we don't notify the client about any destroyed target.
STR:
- Open a tab
- Load
data:text/html,<script>debugger;</script>
- Navigate to
data:text/html,foo
- Navigate back to
data:text/html,<script>debugger;</script>
(using back button) - Open the debugger
- Reload the page
=> The debugger will pause on the debuggger statement - Navigate to the second page (using forward button)
=> The debugger will still report to be paused on the previous page, while we loaded the second
=> The debugger should have been resumed. It isn't because we miss will-navigate. The miss of target-destroyed event isn't so important because we do get the notification of the new target of the second page. And the TargetCommand will report all previous target as being destroyed:
https://searchfox.org/mozilla-central/rev/59e797b66f5ce8a27ede0e7677688931be7aed20/devtools/shared/commands/target/target-command.js#168-174
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Tested again and has been fixed!
Description
•