Closed Bug 1321525 Opened 3 years ago Closed 3 years ago

FileReader.readAs* should throw if called nested

Categories

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

50 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch wpt2.patch (obsolete) — Splinter Review
No description provided.
Attachment #8816092 - Flags: review?(bugs)
Attached patch wpt2.patchSplinter Review
Attachment #8816092 - Attachment is obsolete: true
Attachment #8816092 - Flags: review?(bugs)
Attachment #8816097 - Flags: review?(bugs)
Comment on attachment 8816097 [details] [diff] [review]
wpt2.patch

Looks like also Chrome throws here.


-  r.onload = function() { ok(false, "load should not fire for aborted reads") };
+  r.onload = function() { ok(false, "load should fire when the operation is completed"); };
I don't understand that change. The previous comment is easier to understand.
Attachment #8816097 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c4dcbaa44b9
FileReader.readAs* should throw if called nested, r=smaug
Backed out for failing test_fileapi.html and test_fileReader.html:

https://hg.mozilla.org/integration/mozilla-inbound/rev/1464a199a2a568b8a9259dba6fe7933833254517

Push with failures: https://hg.mozilla.org/integration/mozilla-inbound/rev/8c4dcbaa44b92fe8248c8aac2c6191c15fc91b1d

Failure log test_fileapi.html: https://treeherder.mozilla.org/logviewer.html#?job_id=40187961&repo=mozilla-inbound
07:58:12     INFO - TEST-START | dom/file/tests/test_fileapi.html
07:58:13     INFO - TEST-INFO | started process screentopng
07:58:14     INFO - TEST-INFO | screentopng: exit 0
07:58:14     INFO - TEST-UNEXPECTED-FAIL | dom/file/tests/test_fileapi.html | uncaught exception - SyntaxError: unterminated string literal at 
07:58:14     INFO -     simpletestOnerror@SimpleTest/SimpleTest.js:1583:11
07:58:14     INFO -     OnErrorEventHandlerNonNull*@SimpleTest/SimpleTest.js:1563:1
07:58:14     INFO - JavaScript error: http://mochi.test:8888/tests/dom/file/tests/test_fileapi.html, line 359: SyntaxError: unterminated string literal

That a ' which has to be removed at https://hg.mozilla.org/integration/mozilla-inbound/rev/8c4dcbaa44b92fe8248c8aac2c6191c15fc91b1d#l2.13

Failure log test_fileReader.html: https://treeherder.mozilla.org/logviewer.html#?job_id=40187963&repo=mozilla-inbound
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | should be DONE while firing onabort 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | error set to AbortError for aborted reads 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | file data should be null on aborted reads 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | abort should fire sync 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | loadend should fire sync 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | abort() must throw if not loading 
07:54:47     INFO - TEST-PASS | dom/workers/test/test_fileReader.html | abort() is a no-op unless loading 
07:54:47     INFO - Buffered messages finished
07:54:47     INFO - TEST-UNEXPECTED-FAIL | dom/workers/test/test_fileReader.html | uncaught exception - InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable at http://mochi.test:8888/tests/dom/workers/test/worker_fileReader.js:330:0
07:54:47     INFO -     simpletestOnerror@SimpleTest/SimpleTest.js:1583:11
07:54:47     INFO -     OnErrorEventHandlerNonNull*@SimpleTest/SimpleTest.js:1563:1
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8083de7bddbc
FileReader.readAs* should throw if called nested, r=smaug
https://hg.mozilla.org/mozilla-central/rev/8083de7bddbc
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Flags: needinfo?(amarchesini)
Depends on: 1366794
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.