Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Issue 399863002: Gracefully handle FileReader() read operations when in a detached state. (Closed)

Created:
6 years, 5 months ago by sof
Modified:
6 years, 5 months ago
Reviewers:
haraken, kinuko, nhiroki, horo
CC:
blink-reviews, kinuko+fileapi, nhiroki, tzik, kinuko
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Gracefully handle FileReader() read operations when in a detached state. Follow up r178274 and have FileReader handle the case when it becomes detached from its document and its frame. Read operations can no longer go ahead when that is the case, as the throttling controller isn't available. R=haraken@chromium.org,horo@chromium.org,nhiroki@chromium.org,kinuko@chromium.org BUG=394828 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178426

Patch Set 1 #

Total comments: 4

Patch Set 2 : Safer access of ThrottlingController #

Total comments: 3

Patch Set 3 : Throw AbortError (instead of InvalidStateError.) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -36 lines) Patch
A + LayoutTests/fast/files/file-reader-detached-no-crash.html View 2 chunks +6 lines, -5 lines 0 comments Download
A LayoutTests/fast/files/file-reader-detached-no-crash-expected.txt View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
A + LayoutTests/fast/files/resources/file-reader-detached-no-crash-new-window.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/fileapi/FileReader.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/fileapi/FileReader.cpp View 1 2 10 chunks +61 lines, -29 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
sof
Please take a look. I realized that I had failed to handle the case of ...
6 years, 5 months ago (2014-07-17 11:23:33 UTC) #1
haraken
LGTM, but nhiroki@ or tzik@ wants to confirm (especially if NotSupportedError is a right error ...
6 years, 5 months ago (2014-07-17 12:44:16 UTC) #2
kinuko
(No need to wait for my further comments) https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp#newcode292 Source/core/fileapi/FileReader.cpp:292: exceptionState.throwDOMException(NotSupportedError, ...
6 years, 5 months ago (2014-07-17 15:22:24 UTC) #3
sof
https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp#newcode403 Source/core/fileapi/FileReader.cpp:403: ThrottlingController::FinishReaderType finalStep = throttlingController()->removeReader(this); On 2014/07/17 15:22:24, kinuko (ooo) ...
6 years, 5 months ago (2014-07-17 15:42:45 UTC) #4
sof
https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/1/Source/core/fileapi/FileReader.cpp#newcode403 Source/core/fileapi/FileReader.cpp:403: ThrottlingController::FinishReaderType finalStep = throttlingController()->removeReader(this); On 2014/07/17 15:42:44, sof wrote: ...
6 years, 5 months ago (2014-07-17 22:12:01 UTC) #5
haraken
https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp#newcode321 Source/core/fileapi/FileReader.cpp:321: exceptionState.throwDOMException(InvalidStateError, "Reading from a Document-detached FileReader is not supported."); ...
6 years, 5 months ago (2014-07-18 01:01:54 UTC) #6
nhiroki
lgtm https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp#newcode321 Source/core/fileapi/FileReader.cpp:321: exceptionState.throwDOMException(InvalidStateError, "Reading from a Document-detached FileReader is not ...
6 years, 5 months ago (2014-07-18 01:54:43 UTC) #7
horo
lgtm
6 years, 5 months ago (2014-07-18 03:12:15 UTC) #8
sof
haraken@: the final version looks acceptable to you too? https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp File Source/core/fileapi/FileReader.cpp (right): https://codereview.chromium.org/399863002/diff/20001/Source/core/fileapi/FileReader.cpp#newcode321 Source/core/fileapi/FileReader.cpp:321: ...
6 years, 5 months ago (2014-07-18 05:26:37 UTC) #9
haraken
> haraken@: the final version looks acceptable to you too? Yes, LGTM.
6 years, 5 months ago (2014-07-18 05:28:40 UTC) #10
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 05:32:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/399863002/40001
6 years, 5 months ago (2014-07-18 05:33:33 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_blink_compile_dbg on tryserver.blink ...
6 years, 5 months ago (2014-07-18 06:36:39 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 06:50:30 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/17636)
6 years, 5 months ago (2014-07-18 06:50:31 UTC) #15
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 07:01:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/399863002/40001
6 years, 5 months ago (2014-07-18 07:02:02 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-07-18 08:02:27 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 08:40:24 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/17661)
6 years, 5 months ago (2014-07-18 08:40:25 UTC) #20
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 5 months ago (2014-07-18 08:45:35 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/399863002/40001
6 years, 5 months ago (2014-07-18 08:46:31 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink ...
6 years, 5 months ago (2014-07-18 09:21:37 UTC) #23
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 09:51:24 UTC) #24
Message was sent while issue was closed.
Change committed as 178426

Powered by Google App Engine
This is Rietveld 408576698