Closed Bug 722962 Opened 8 years ago Closed 8 years ago

intermittent failure in /tests/content/base/test/test_XHR.html | hello pass


(Core :: DOM: Core & HTML, defect)

Not set



Tracking Status
firefox11 --- unaffected
firefox12 - fixed


(Reporter: philor, Assigned: emk)



(Keywords: intermittent-failure, regression, Whiteboard: [qa-])


(1 file, 3 obsolete files)

+++ This bug was initially created as a clone of Bug #656253 +++
Rev3 WINNT 5.1 mozilla-central opt test mochitests-1/5 on 2012-01-31 05:03:58

6764 ERROR TEST-UNEXPECTED-FAIL | /tests/content/base/test/test_XHR.html | hello pass
Rev3 WINNT 6.1 mozilla-inbound opt test mochitests-1/5 on 2012-01-31 17:06:47

6764 ERROR TEST-UNEXPECTED-FAIL | /tests/content/base/test/test_XHR.html | hello pass
Attached patch patch (obsolete) — Splinter Review
|var fr| can race after bug 696586 because it is executed twice now.
Wrapped the code in an anonymous function to avoid the race.
Also added |"use strict";| directive.
Assignee: nobody → VYV03354
Attachment #593371 - Flags: review?(jonas)
Blocks: 696586
Can you explain what's happening here?

I don't see how runTests is run twice, and even if it was, 'fr' is a local variable so it will go out of scope after the first run, no?

Nit: please put the "use strict" on a separate line.
(In reply to Jonas Sicking (:sicking) from comment #2)
|var fr = new FileReader();| at line 237 will be executed twice because a for-loop has been added by bug 696586 (from line 218 to line 302).
'fr' will be overwritten even if it is a local variable because the for-loop will not create a independent scope. I added a anonymous function to create a new scope for every execute.
Attached patch patch v2 (obsolete) — Splinter Review
Attachment #593626 - Flags: review?(jonas)
Attachment #593371 - Attachment is obsolete: true
Attachment #593371 - Flags: review?(jonas)
Comment on attachment 593626 [details] [diff] [review]
patch v2

Review of attachment 593626 [details] [diff] [review]:

r=me if you also fix the indentation in this file. Both the fact that this whole thing is wrapped in a function, and the for-loop is all too easy to miss.
Attachment #593626 - Flags: review?(jonas) → review+
Attached patch patch for check in; r=jonas (obsolete) — Splinter Review
Attachment #593626 - Attachment is obsolete: true
Attachment #593794 - Flags: review+
Keywords: checkin-needed
Sorry, the previous patch didn't pass the test
Attachment #593794 - Attachment is obsolete: true
Attachment #593798 - Flags: review+
Whiteboard: [orange] → [orange] [autoland-try]
Whiteboard: [orange] [autoland-try] → [orange] [autoland-in-queue]
Autoland Patchset:
	Patches: 593798
	Branch: mozilla-central => try
Try run started, revision f1b3301da9a5. To cancel or monitor the job, see:
Try run for f1b3301da9a5 is complete.
Detailed breakdown of the results available here:
Results (out of 206 total builds):
    success: 185
    warnings: 21
Builds (or logs if builds failed) available at:
 Timed out after 06 hours without completing.
Keywords: checkin-needed
Whiteboard: [orange] [autoland-in-queue] → [orange]
Target Milestone: --- → mozilla13
Closed: 8 years ago
Resolution: --- → FIXED
We don't typically track a test-only change for release, but we'll gladly accept a nomination to fix this orange on Aurora 12.
Comment on attachment 593798 [details] [diff] [review]
patch for check in; r=jonas

[Approval Request Comment]
Regression caused by (bug #): bug 696586
User impact if declined: None (test only)
Testing completed (on m-c, etc.): No test orange on m-c for 5 days
Risk to taking this patch (and alternatives if risky): None (test only)
String changes made by this patch: None
Attachment #593798 - Flags: approval-mozilla-aurora?
Comment on attachment 593798 [details] [diff] [review]
patch for check in; r=jonas

[Triage Comment]
Approved for Aurora 12.
Attachment #593798 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Keywords: checkin-needed
Whiteboard: [orange] → [orange] [land to aurora]
Whiteboard: [orange] → [orange][qa-]
Whiteboard: [orange][qa-] → [qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.