Stop waiting on DOMContentLoaded to initialize the walker
Categories
(DevTools :: Inspector, task)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
Details
The inspector actor initialization expects the corresponding document to be fully initialized at https://searchfox.org/mozilla-central/rev/6f6cf2810742d32454251afdb8e632c27999bea7/devtools/server/actors/inspector/inspector.js#144-149
If not we wait for DOMContentLoaded, which will never be fired if the author called document.write without calling document.close.
In Bug 1765760, we working around this issue by waiting at most for 500ms for the event.
But in theory the inspector doesn't need to have a fully loaded document to star, so we should be able to fully get rid of this event.
However, doing so triggers some intermittent failures: https://treeherder.mozilla.org/jobs?repo=try&revision=83128f05a71ad466586d7b9564d5ef42f40622fe, all related to reload/navigation
- devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_navigate_to_url.js
- devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_navigate_reload_button.js
- devtools/client/inspector/markup/test/browser_markup_events_source_map.js
There might be other impacted tests, those are just the ones spotted for a single run of ./mach try --preset devtools
Description
•