tp4 shouldn't call document.write() from a timeout

RESOLVED FIXED

Status

Release Engineering
General
P3
normal
RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: hsivonen, Assigned: alice)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [talos])

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
Created attachment 418338 [details] [diff] [review]
Patch to enable the HTML5 parser

Steps to reproduce:
 1) Push to try with the attached HTML5-enabling patch applied.

Expected results:
Expected the tp4 run to complete.

Actual results:
The tp4 run hangs at nytimes.

Additional info:
The nytimes test calls document.write() from setTimeout(). With the old parser, if the timeout fires before the parse is complete, the call succeeds in the sense that it writes to the stream at an indeterminate location.

According to HTML5, a call to document.write() from anything but a synchronously executed script element implies a call to document.open(). That is, a call to document.write() from a timeout first blows away the previous document and then writes to the newly opened document. Since document.close() is not called on the newly opened document, its onload never fires and the test suite hangs when document.write() complies with HTML5 (as it does when html5.enable is set to true).

The offending lines of code try to load a non-existent script file by document.writing a script tag from a callback that is passed to setTimeout(). Since the code tries to load a non-existent script, it seems safe (for historical performance data) to remove the problematic callback.
(Reporter)

Comment 1

9 years ago
Created attachment 418339 [details] [diff] [review]
[checked in]Fix: don't call document.write() from setTimeout()
Attachment #418339 - Flags: review?(anodelman)
(Assignee)

Comment 2

9 years ago
Comment on attachment 418339 [details] [diff] [review]
[checked in]Fix: don't call document.write() from setTimeout()

Need a downtime for this change to be applied to the tp4 test.
Attachment #418339 - Flags: review?(anodelman) → review+

Comment 3

9 years ago
Alice: are we still waiting on a downtime?
Priority: -- → P3
Whiteboard: [talos]
(Assignee)

Updated

9 years ago
Assignee: nobody → anodelman
(Assignee)

Updated

9 years ago
Blocks: 539135
(Assignee)

Comment 4

9 years ago
Comment on attachment 418339 [details] [diff] [review]
[checked in]Fix: don't call document.write() from setTimeout()

Changed pageset used by production talos.

Will still need to update the few other copies of tp4 that we have kicking around.
Attachment #418339 - Attachment description: Fix: don't call document.write() from setTimeout() → [checked in]Fix: don't call document.write() from setTimeout()
Attachment #418339 - Flags: checked-in+
(Reporter)

Comment 5

9 years ago
tp4 seems to run to completion on tryserver now. Thanks!
(Assignee)

Comment 6

9 years ago
Copy of tp4 on fs (Users/alice) updated to latest.

All done here.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.