Closed Bug 1794423 Opened 2 years ago Closed 2 years ago

Improve NetError page loading

Categories

(Firefox :: General, defect, P1)

Firefox 107
defect

Tracking

()

RESOLVED FIXED
107 Branch
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.

(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. :-(

Set release status flags based on info from the regressing bug 1734217

See Also: → 1722896

Also make a few tests be more robust.

Attachment #9297958 - Attachment description: Bug 1794423 - Make NetError page loading a bit more synchronous. r=gijs! → Bug 1794423 - Make NetError page loading more synchronous. r=gijs!
Pushed by earo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e108937f011 Make NetError page loading more synchronous. r=Gijs,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: