Improve NetError page loading
Categories
(Firefox :: General, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox105 | --- | unaffected |
firefox106 | --- | unaffected |
firefox107 | --- | fixed |
People
(Reporter: eemeli, Assigned: eemeli)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This might not be an actual regression of bug 1734217, but of something identified by :Gijs after it landed:
Looking at this page again for unrelated reasons, something I missed in review: the main error page script was turned into a module. That means it loads asynchronously. But the script has an event listener for DOMContentLoaded. AFAIK there is no guarantee that that event hasn't already fired by the time the script loads, so I think that there is now a race condition in these pages. Eemeli, am I missing something?
Also from :Gijs:
More generally for perf/flicker reasons it'd be better if some of the processing (esp/also fluent string id assignments!) in that file happened sync, not async, so that they'd be in place by first paint - and I'm not entirely sure why it was changed to be a module rather than a normal (sync) script.
The change to load the script with type="module"
was made in bug 1685552.
The race condition should be avoidable by simply inlining the contents of the listener at the top level, but it's possible that this will have some side effects that need to be sorted out.
Comment 1•2 years ago
|
||
(In reply to Eemeli Aro [:eemeli] from comment #0)
The change to load the script with
type="module"
was made in bug 1685552.
Oh! You just changed the filename to reflect that reality. Sorry for misattributing the cause of that change - I noticed the change in extension and jumped to conclusions. :-(
Updated•2 years ago
|
Comment 2•2 years ago
|
||
Set release status flags based on info from the regressing bug 1734217
Assignee | ||
Comment 3•2 years ago
|
||
Also make a few tests be more robust.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
bugherder |
Description
•