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

Issue 12094106: Refactor: Simplify WaitableEventWatcher. (Closed)

Created:
7 years, 10 months ago by teravest
Modified:
7 years, 10 months ago
CC:
chromium-reviews, jam, sail+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, markusheintz_, erikwright+watch_chromium.org, tfarina
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Refactor: Simplify WaitableEventWatcher. This change uses a callback instead of a delegate for specifying what should be called when a WaitableEvent occurs. This simplifies the class and gets rid of a workaround internal to the class to prevent name collision on "Delegate" inner classes. Tested (linux and windows): out/Debug/base_unittests --gtest_filter=*WaitableEventWatcherTest* out/Release/ipc_tests with valgrind and leak-check=yes Previously reverted at: https://codereview.chromium.org/12087120/ BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180450

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -160 lines) Patch
M base/synchronization/waitable_event_watcher.h View 1 2 3 4 3 chunks +22 lines, -72 lines 0 comments Download
M base/synchronization/waitable_event_watcher_posix.cc View 7 chunks +13 lines, -12 lines 0 comments Download
M base/synchronization/waitable_event_watcher_unittest.cc View 7 chunks +18 lines, -20 lines 0 comments Download
M base/synchronization/waitable_event_watcher_win.cc View 2 chunks +11 lines, -23 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/plugin_data_remover_impl_browsertest.cc View 3 chunks +6 lines, -4 lines 0 comments Download
M content/browser/plugin_service_impl.h View 2 chunks +2 lines, -5 lines 0 comments Download
M content/browser/plugin_service_impl.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M ipc/ipc_sync_channel.h View 1 2 3 4 6 chunks +8 lines, -8 lines 0 comments Download
M ipc/ipc_sync_channel.cc View 1 2 3 6 chunks +19 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
teravest
This change fixes a memory leak that existed last time around inside SyncChannel. It made ...
7 years, 10 months ago (2013-02-01 16:52:24 UTC) #1
dmichael (off chromium)
Can you reference the original CL and/or the revert in your description? https://codereview.chromium.org/12094106/diff/1/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc ...
7 years, 10 months ago (2013-02-01 17:27:18 UTC) #2
teravest
Cleaned up the code as you recommended, no leaks with valgrind.
7 years, 10 months ago (2013-02-01 17:54:15 UTC) #3
dmichael (off chromium)
lgtm
7 years, 10 months ago (2013-02-01 18:13:23 UTC) #4
brettw
https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc#newcode358 ipc/ipc_sync_channel.cc:358: base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this)); Does this have the same leak? It ...
7 years, 10 months ago (2013-02-01 18:19:25 UTC) #5
dmichael (off chromium)
https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc#newcode358 ipc/ipc_sync_channel.cc:358: base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this)); On 2013/02/01 18:19:25, brettw wrote: > Does ...
7 years, 10 months ago (2013-02-01 18:26:28 UTC) #6
teravest
https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): https://codereview.chromium.org/12094106/diff/9001/ipc/ipc_sync_channel.cc#newcode358 ipc/ipc_sync_channel.cc:358: base::Bind(&SyncChannel::SyncContext::OnWaitableEventSignaled, this)); On 2013/02/01 18:26:28, dmichael wrote: > On ...
7 years, 10 months ago (2013-02-01 18:30:46 UTC) #7
brettw
lgtm
7 years, 10 months ago (2013-02-01 19:26:10 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12094106/14001
7 years, 10 months ago (2013-02-01 19:41:24 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=106433
7 years, 10 months ago (2013-02-01 21:41:39 UTC) #10
tfarina
https://codereview.chromium.org/12094106/diff/14001/base/synchronization/waitable_event_watcher.h File base/synchronization/waitable_event_watcher.h (right): https://codereview.chromium.org/12094106/diff/14001/base/synchronization/waitable_event_watcher.h#newcode40 base/synchronization/waitable_event_watcher.h:40: // void OnWaitableEventSignaled(WaitableEvent* waitable_event) { you can make this ...
7 years, 10 months ago (2013-02-02 03:17:29 UTC) #11
tfarina
https://codereview.chromium.org/12094106/diff/14001/ipc/ipc_sync_channel.h File ipc/ipc_sync_channel.h (right): https://codereview.chromium.org/12094106/diff/14001/ipc/ipc_sync_channel.h#newcode182 ipc/ipc_sync_channel.h:182: void OnWaitableEventSignaled(base::WaitableEvent* arg); nit: s/arg/event ? I know it ...
7 years, 10 months ago (2013-02-02 03:20:49 UTC) #12
teravest
https://codereview.chromium.org/12094106/diff/14001/base/synchronization/waitable_event_watcher.h File base/synchronization/waitable_event_watcher.h (right): https://codereview.chromium.org/12094106/diff/14001/base/synchronization/waitable_event_watcher.h#newcode40 base/synchronization/waitable_event_watcher.h:40: // void OnWaitableEventSignaled(WaitableEvent* waitable_event) { On 2013/02/02 03:17:29, tfarina ...
7 years, 10 months ago (2013-02-04 15:16:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/12094106/25001
7 years, 10 months ago (2013-02-04 15:17:27 UTC) #14
commit-bot: I haz the power
7 years, 10 months ago (2013-02-04 18:14:29 UTC) #15
Message was sent while issue was closed.
Change committed as 180450

Powered by Google App Engine
This is Rietveld 408576698