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

Issue 1046353004: Access fields from the appropriate threads in FilePathWatcherFSEvents. (Closed)

Created:
5 years, 8 months ago by Reilly Grant (use Gerrit)
Modified:
5 years, 8 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Access fields from the appropriate threads in FilePathWatcherFSEvents. Limit reads and writes to the target_, resolved_target_ and callback_ fields to the libdispatch task runner only. This should resolve possible races between calls to FilePathWatcherFSEvents::Watch and incoming events. BUG=457793 Committed: https://crrev.com/6422ac627ba05c4cbcbdec5a80484e5b8859028a Cr-Commit-Position: refs/heads/master@{#324706}

Patch Set 1 : #

Total comments: 7

Patch Set 2 : Use callback_ and resolved_target_ as sentinels. #

Total comments: 6

Patch Set 3 : Protect access to callback_ and add comments about thread usage. #

Patch Set 4 : Check callback_ instead of fsevent_stream_ in destructor. #

Total comments: 8

Patch Set 5 : Add comments about thread usage. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -87 lines) Patch
M base/files/file_path_watcher_fsevents.h View 1 2 3 4 2 chunks +34 lines, -13 lines 0 comments Download
M base/files/file_path_watcher_fsevents.cc View 1 2 3 4 6 chunks +91 lines, -74 lines 0 comments Download

Messages

Total messages: 17 (3 generated)
Reilly Grant (use Gerrit)
Please take a look. This should resolve the issues you pointed out. Thanks for the ...
5 years, 8 months ago (2015-04-01 23:03:21 UTC) #3
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1046353004/diff/20001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (left): https://codereview.chromium.org/1046353004/diff/20001/base/files/file_path_watcher_fsevents.cc#oldcode200 base/files/file_path_watcher_fsevents.cc:200: // It can happen that the watcher gets canceled ...
5 years, 8 months ago (2015-04-02 17:35:45 UTC) #4
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1046353004/diff/20001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (left): https://codereview.chromium.org/1046353004/diff/20001/base/files/file_path_watcher_fsevents.cc#oldcode200 base/files/file_path_watcher_fsevents.cc:200: // It can happen that the watcher gets canceled ...
5 years, 8 months ago (2015-04-02 17:53:31 UTC) #5
Reilly Grant (use Gerrit)
Thank you for the feedback. I've updated the code to use callback_ as a sentinel ...
5 years, 8 months ago (2015-04-02 22:41:57 UTC) #6
Mattias Nissler (ping if slow)
This is definitely moving in the right direction now. https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (right): https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc#newcode155 base/files/file_path_watcher_fsevents.cc:155: ...
5 years, 8 months ago (2015-04-07 11:36:21 UTC) #7
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (right): https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc#newcode155 base/files/file_path_watcher_fsevents.cc:155: DCHECK(!fsevent_stream_) On 2015/04/07 11:36:20, Mattias Nissler wrote: > Is ...
5 years, 8 months ago (2015-04-07 20:42:15 UTC) #8
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (right): https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc#newcode155 base/files/file_path_watcher_fsevents.cc:155: DCHECK(!fsevent_stream_) On 2015/04/07 20:42:14, reillyg wrote: > On 2015/04/07 ...
5 years, 8 months ago (2015-04-08 07:57:10 UTC) #9
Reilly Grant (use Gerrit)
On 2015/04/08 07:57:10, Mattias Nissler wrote: > https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc > File base/files/file_path_watcher_fsevents.cc (right): > > https://codereview.chromium.org/1046353004/diff/40001/base/files/file_path_watcher_fsevents.cc#newcode155 ...
5 years, 8 months ago (2015-04-08 18:19:08 UTC) #10
Mattias Nissler (ping if slow)
https://codereview.chromium.org/1046353004/diff/80001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (right): https://codereview.chromium.org/1046353004/diff/80001/base/files/file_path_watcher_fsevents.cc#newcode155 base/files/file_path_watcher_fsevents.cc:155: DCHECK(callback_.is_null()) Now, if the object gets destroyed on the ...
5 years, 8 months ago (2015-04-10 09:15:52 UTC) #11
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1046353004/diff/80001/base/files/file_path_watcher_fsevents.cc File base/files/file_path_watcher_fsevents.cc (right): https://codereview.chromium.org/1046353004/diff/80001/base/files/file_path_watcher_fsevents.cc#newcode155 base/files/file_path_watcher_fsevents.cc:155: DCHECK(callback_.is_null()) On 2015/04/10 09:15:51, Mattias Nissler wrote: > Now, ...
5 years, 8 months ago (2015-04-10 18:32:47 UTC) #12
Mattias Nissler (ping if slow)
LGTM, thanks!
5 years, 8 months ago (2015-04-10 19:13:16 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1046353004/100001
5 years, 8 months ago (2015-04-10 20:37:11 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 8 months ago (2015-04-10 23:07:38 UTC) #16
commit-bot: I haz the power
5 years, 8 months ago (2015-04-10 23:10:49 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/6422ac627ba05c4cbcbdec5a80484e5b8859028a
Cr-Commit-Position: refs/heads/master@{#324706}

Powered by Google App Engine
This is Rietveld 408576698