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

Issue 2438913003: Require FilePathWatcher destructor to be called in sequence with Watch(). (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 1 month ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Require FilePathWatcher destructor to be called in sequence with Watch(). file_path_watcher_win.cc and file_path_watcher_kqueue.cc need to do some cleanup on the sequence from which Watch() is called. They use destruction observers to do this cleanup when the MessageLoop from which Watch() is called is destroyed (after that, it is too late to post tasks to the MessageLoop sequence). With this CL, the FilePathWatcher destructor must be called on the sequence from which Watch() is called. That means that will be able to move the work done in MessageLoop destruction observers to the FilePathWatcher destructor. Getting rid of destruction observers in FilePathWatcher is important because they are not supported in TaskScheduler. TBR=scottbyer@chromium.org BUG=650723 Committed: https://crrev.com/1ce19c6494518bcc1cc1fd4b2bfc73e6f6e41fa0 Cr-Commit-Position: refs/heads/master@{#431921}

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 : fix test errors #

Patch Set 5 : Fix ItunesFileUtilTest #

Patch Set 6 : SignalStopped earlier #

Patch Set 7 : Fix ItunesFileUtilTest #

Total comments: 2

Patch Set 8 : rebase #

Patch Set 9 : CR dcheng #33 (fix comment) #

Total comments: 2

Patch Set 10 : CR thestig #36 (fix comment) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -104 lines) Patch
M base/files/file_path_watcher.h View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -1 line 0 comments Download
M base/files/file_path_watcher.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M base/files/file_path_watcher_linux.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/files/file_path_watcher_mac.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/files/file_path_watcher_stub.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M base/files/file_path_watcher_unittest.cc View 1 2 3 32 chunks +25 lines, -68 lines 0 comments Download
M base/files/file_path_watcher_win.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/file_path_watcher_util.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/file_path_watcher_util.cc View 1 2 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/iapps_data_provider.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc View 1 2 3 4 6 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/picasa_data_provider.cc View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M chrome/common/service_process_util.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/common/service_process_util_posix.h View 1 2 3 4 5 4 chunks +8 lines, -7 lines 0 comments Download
M chrome/common/service_process_util_posix.cc View 1 2 3 4 5 5 chunks +22 lines, -20 lines 0 comments Download
M chrome/common/service_process_util_win.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/service/service_process.cc View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 51 (39 generated)
fdoray
PTAL
4 years, 1 month ago (2016-11-09 17:48:32 UTC) #31
dcheng
lgtm https://codereview.chromium.org/2438913003/diff/120001/base/files/file_path_watcher.h File base/files/file_path_watcher.h (right): https://codereview.chromium.org/2438913003/diff/120001/base/files/file_path_watcher.h#newcode30 base/files/file_path_watcher.h:30: // Must be destructed on the sequence that ...
4 years, 1 month ago (2016-11-09 18:39:12 UTC) #33
fdoray
thestig@: Please review changes in chrome/browser/media_galleries and chrome/common scottbyer@: Please review changes in chrome/service. https://codereview.chromium.org/2438913003/diff/120001/base/files/file_path_watcher.h ...
4 years, 1 month ago (2016-11-10 15:46:21 UTC) #35
Lei Zhang
lgtm https://codereview.chromium.org/2438913003/diff/160001/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h File chrome/browser/media_galleries/fileapi/file_path_watcher_util.h (right): https://codereview.chromium.org/2438913003/diff/160001/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h#newcode25 chrome/browser/media_galleries/fileapi/file_path_watcher_util.h:25: // Stops a file path watch started by ...
4 years, 1 month ago (2016-11-10 18:59:31 UTC) #36
fdoray
Scott Byer: Please review changes in chrome/service/ https://codereview.chromium.org/2438913003/diff/160001/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h File chrome/browser/media_galleries/fileapi/file_path_watcher_util.h (right): https://codereview.chromium.org/2438913003/diff/160001/chrome/browser/media_galleries/fileapi/file_path_watcher_util.h#newcode25 chrome/browser/media_galleries/fileapi/file_path_watcher_util.h:25: // Stops ...
4 years, 1 month ago (2016-11-11 15:47:39 UTC) #37
Scott Byer
lgtm
4 years, 1 month ago (2016-11-14 18:08:59 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2438913003/180001
4 years, 1 month ago (2016-11-14 18:11:57 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/67041)
4 years, 1 month ago (2016-11-14 19:30:10 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2438913003/180001
4 years, 1 month ago (2016-11-14 19:43:53 UTC) #46
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 1 month ago (2016-11-14 22:38:30 UTC) #48
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/1ce19c6494518bcc1cc1fd4b2bfc73e6f6e41fa0 Cr-Commit-Position: refs/heads/master@{#431921}
4 years, 1 month ago (2016-11-14 22:58:37 UTC) #50
tommycli
4 years, 1 month ago (2016-11-19 00:27:53 UTC) #51
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:180001) has been created in
https://codereview.chromium.org/2514113003/ by tommycli@chromium.org.

The reason for reverting is: I'm sorry, but I'm pretty confident that this patch
is causing some trybot flakes.

See: https://bugs.chromium.org/p/chromium/issues/detail?id=665511

Flakes link:
https://chromium-try-flakes.appspot.com/all_flake_occurrences?key=ahVzfmNocm9....

Powered by Google App Engine
This is Rietveld 408576698