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

Issue 458093002: [FileAPI] Check Platform availability before using it in LocalFileSystem (Closed)

Created:
6 years, 4 months ago by tzik
Modified:
6 years, 4 months ago
Reviewers:
kinuko, nhiroki
CC:
blink-reviews, kinuko+fileapi, nhiroki, tzik
Project:
blink
Visibility:
Public.

Description

[FileAPI] Check Platform availability before using it in LocalFileSystem BUG=399803 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179911

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -9 lines) Patch
M Source/modules/filesystem/LocalFileSystem.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M Source/modules/filesystem/LocalFileSystem.cpp View 1 2 6 chunks +38 lines, -8 lines 2 comments Download

Messages

Total messages: 9 (0 generated)
tzik
PTL
6 years, 4 months ago (2014-08-11 05:03:19 UTC) #1
tzik
Updated, as we chatted offline.
6 years, 4 months ago (2014-08-11 05:25:36 UTC) #2
nhiroki
LGTM with nits https://codereview.chromium.org/458093002/diff/20001/Source/modules/filesystem/LocalFileSystem.cpp File Source/modules/filesystem/LocalFileSystem.cpp (right): https://codereview.chromium.org/458093002/diff/20001/Source/modules/filesystem/LocalFileSystem.cpp#newcode117 Source/modules/filesystem/LocalFileSystem.cpp:117: Platform* platform = blink::Platform::current(); nit: "blink::" ...
6 years, 4 months ago (2014-08-11 05:31:52 UTC) #3
tzik
https://codereview.chromium.org/458093002/diff/20001/Source/modules/filesystem/LocalFileSystem.cpp File Source/modules/filesystem/LocalFileSystem.cpp (right): https://codereview.chromium.org/458093002/diff/20001/Source/modules/filesystem/LocalFileSystem.cpp#newcode117 Source/modules/filesystem/LocalFileSystem.cpp:117: Platform* platform = blink::Platform::current(); On 2014/08/11 05:31:52, nhiroki wrote: ...
6 years, 4 months ago (2014-08-11 06:18:46 UTC) #4
tzik
The CQ bit was checked by tzik@chromium.org
6 years, 4 months ago (2014-08-11 06:26:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tzik@chromium.org/458093002/40001
6 years, 4 months ago (2014-08-11 06:27:15 UTC) #6
commit-bot: I haz the power
Change committed as 179911
6 years, 4 months ago (2014-08-11 07:24:23 UTC) #7
kinuko
DBC https://codereview.chromium.org/458093002/diff/40001/Source/modules/filesystem/LocalFileSystem.cpp File Source/modules/filesystem/LocalFileSystem.cpp (right): https://codereview.chromium.org/458093002/diff/40001/Source/modules/filesystem/LocalFileSystem.cpp#newcode120 Source/modules/filesystem/LocalFileSystem.cpp:120: return Platform::current()->fileSystem(); Is the crash happening because Platform::shutdown() ...
6 years, 4 months ago (2014-08-11 16:03:49 UTC) #8
tzik
6 years, 4 months ago (2014-08-12 06:12:11 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/458093002/diff/40001/Source/modules/filesyste...
File Source/modules/filesystem/LocalFileSystem.cpp (right):

https://codereview.chromium.org/458093002/diff/40001/Source/modules/filesyste...
Source/modules/filesystem/LocalFileSystem.cpp:120: return
Platform::current()->fileSystem();
On 2014/08/11 16:03:49, kinuko (slow to respond) wrote:
> Is the crash happening because Platform::shutdown() is called on the main
thread
> before we access Platform::current() on the worker thread (do we still have
> not-joining worker thread problems)?  Is it guaranteed it's not nullified
> between line 117 and where we use fileSystem()?  (Sorry if I'm asking
something
> outdated)

Right, we still can't assume all workers join to the main thread in the shutdown
phase. And, yes, Platform::shutdown() and this Platform::current() check look
racy :<

Powered by Google App Engine
This is Rietveld 408576698