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

Issue 478263002: Avoid GCing an aborting and stopped FileReader. (Closed)

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

Description

Avoid GCing an aborting and stopped FileReader. If a FileReader is abort()ed, a task is scheduled to perform the actual abort operation. Should the containing Document's ActiveDOMObjects be stopped before that task gets to run, the FileReader would already advance to a DONE state and be at risk from being GCed before the abort task gets to run. If so, it would then access a dead object. The provided test elicits an assert that shows up the problem, but doesn't trigger the GC and subsequent access of the dead object. R=kouhei@chromium.org, tzik@chromium.org BUG=404513 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180450

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -1 line) Patch
A LayoutTests/fast/files/file-reader-abort-gc-iframe.html View 1 chunk +26 lines, -0 lines 0 comments Download
A + LayoutTests/fast/files/file-reader-abort-gc-iframe-expected.txt View 1 chunk +2 lines, -1 line 0 comments Download
A LayoutTests/fast/files/resources/file-reader-abort-gc-iframe.html View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/fileapi/FileReader.cpp View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
sof
Please take a look.
6 years, 4 months ago (2014-08-18 09:17:05 UTC) #1
kouhei (in TOK)
lgtm, but I'm not super confident with this. tzik: Would you take an another look?
6 years, 4 months ago (2014-08-18 10:54:07 UTC) #2
tzik
lgtm
6 years, 4 months ago (2014-08-18 12:07:35 UTC) #3
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 4 months ago (2014-08-18 12:10:37 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/478263002/1
6 years, 4 months ago (2014-08-18 12:11:35 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (1) as 180450
6 years, 4 months ago (2014-08-18 12:14:53 UTC) #6
haraken
6 years, 4 months ago (2014-08-18 12:27:31 UTC) #7
Message was sent while issue was closed.
LGTM

Powered by Google App Engine
This is Rietveld 408576698