DescriptionFinalize a throttled FileReader in stages.
File read operations are throttled, a controller keeping track of a
set of running readers, and those waiting for a turn. In the case of a
running FileReader just completing its operation and an onload* event
listener issuing a new read operation over the same reader, the
throttling controller must correctly handle the renewal of that
FileReader as a running (or now-pending) reader.
This includes signalling that there's pending activity starting (and
later on, completing) on the FileReader itself, something that wasn't
correctly in this nested case.
To address, a FileReader will now remove itself from its throttling
controller in two stages:
- once the readyState transitions from LOADING, the FileReader is
removed as a running reader.
- once the FileReader has dispatched all the required events, the
FileReader itself signals that the pending activity has completed.
In combination, this balances the reference counting on the underlying
object.
R=kinuko@chromium.org
BUG=345608
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167706
Patch Set 1 #
Total comments: 5
Patch Set 2 : Rename added finalization class #Patch Set 3 : Be explicit about performing 2nd finishing step #
Total comments: 4
Patch Set 4 : Rename FinishReader enum as FinishReaderType #Messages
Total messages: 14 (0 generated)
|