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

Issue 6463013: Add support for base::Closure in the MessageLoop. (Closed)

Created:
9 years, 10 months ago by awong
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr., Alexander Potapenko, jam, Timur Iskhodzhanov, apatrick_chromium, pam+watch_chromium.org, stuartmorgan+watch_chromium.org, darin-cc_chromium.org, Ami GONE FROM CHROMIUM
Visibility:
Public.

Description

Add support for base::Closure in the MessageLoop, and reimplement the whole sucker on top of base::Closure. After this, all Task objects that are posted will be wrapped in a closure prior to dispatch. BUG=35223 TEST=unittests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82300

Patch Set 1 #

Total comments: 1

Patch Set 2 : Ported 1/2 the unittests. #

Patch Set 3 : Ported more unittests #

Patch Set 4 : Fix windows compilation #

Patch Set 5 : work around __stdcall #

Total comments: 8

Patch Set 6 : tracked objects + unittest port. #

Patch Set 7 : stripped down ClosureObserver. #

Patch Set 8 : windows fixes #

Patch Set 9 : silly jankometer #

Patch Set 10 : more small fixes. #

Patch Set 11 : more compile fixes #

Patch Set 12 : Get the architecture ifdef right. #

Patch Set 13 : windows compile fixes. #

Patch Set 14 : scoped handle fix #

Patch Set 15 : Make TaskClosureAdapter act more Task like. #

Patch Set 16 : hack around a race. #

Patch Set 17 : Fix valgrind supressions. #

Patch Set 18 : rebased #

Total comments: 14

Patch Set 19 : address will's comments. #

Total comments: 3

Patch Set 20 : rebase and address Darin's comment #

Patch Set 21 : Fix merge error. #

Total comments: 3

Patch Set 22 : rebased #

Patch Set 23 : Painting the Closures to Tasks... #

Patch Set 24 : missed one. Off with...my?...head! #

Total comments: 2

Patch Set 25 : add TODO #

Patch Set 26 : rebased again #

Patch Set 27 : fix bad merge #

Total comments: 10

Patch Set 28 : rebase + joth fix + clang fix + valgrind update #

Patch Set 29 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+809 lines, -686 lines) Patch
M base/bind_helpers.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M base/bind_internal_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -0 lines 0 comments Download
M base/bind_internal_win.h.pump View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -0 lines 0 comments Download
M base/message_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 9 chunks +76 lines, -16 lines 0 comments Download
M base/message_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 13 chunks +174 lines, -54 lines 0 comments Download
M base/message_loop_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 44 chunks +501 lines, -571 lines 0 comments Download
M chrome/browser/jankometer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +8 lines, -8 lines 0 comments Download
M content/gpu/gpu_watchdog_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +2 lines, -2 lines 0 comments Download
M content/gpu/gpu_watchdog_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -7 lines 0 comments Download
M content/renderer/renderer_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +3 lines, -3 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 16 chunks +19 lines, -17 lines 0 comments Download
M tools/valgrind/memcheck/suppressions_mac.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 7 chunks +7 lines, -7 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
awong
Does this look about right? If so, I'll go mess with the unittests.
9 years, 10 months ago (2011-02-09 02:00:08 UTC) #1
willchan no longer on Chromium
Looks about right. http://codereview.chromium.org/6463013/diff/1/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/1/base/message_loop.cc#newcode242 base/message_loop.cc:242: // TODO(ajwong): Record |from_here| correctly for ...
9 years, 10 months ago (2011-02-09 05:51:48 UTC) #2
awong
[ +darin ] I'm thinking of doing the TrackedObjects change in a second CL. I'm ...
9 years, 10 months ago (2011-02-12 09:56:01 UTC) #3
awong
I ended up giving a shot at creating a "Closure" version of a lot of ...
9 years, 10 months ago (2011-02-13 07:39:53 UTC) #4
willchan no longer on Chromium
Have not read all the tests yet. I support forking them now. It doesn't change ...
9 years, 10 months ago (2011-02-15 01:41:11 UTC) #5
darin (slow to review)
I believe TaskObserver was modified to pass a Task just so that people could get ...
9 years, 10 months ago (2011-02-15 05:05:47 UTC) #6
awong
Okay, hold off on reviewing for a bit. Per Darin's comment, will redo this CL ...
9 years, 10 months ago (2011-02-15 08:24:42 UTC) #7
darin (slow to review)
On Tue, Feb 15, 2011 at 12:24 AM, <ajwong@chromium.org> wrote: > Okay, hold off on ...
9 years, 10 months ago (2011-02-15 18:13:19 UTC) #8
awong
I think this is ready for another look finally. There are some valgrind issues that ...
9 years, 9 months ago (2011-03-21 19:34:31 UTC) #9
awong
PTAL Verified that all valgrind issues from the last run were either present in unrelated ...
9 years, 9 months ago (2011-03-21 23:54:27 UTC) #10
willchan no longer on Chromium
http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc#newcode7 base/message_loop.cc:7: // This needs to be above the gdk includes ...
9 years, 9 months ago (2011-03-22 23:30:45 UTC) #11
awong
http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc#newcode7 base/message_loop.cc:7: // This needs to be above the gdk includes ...
9 years, 9 months ago (2011-03-23 04:05:45 UTC) #12
willchan no longer on Chromium
http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc#newcode94 base/message_loop.cc:94: // |should_leak_task| points to a flag variable that can ...
9 years, 9 months ago (2011-03-23 18:01:09 UTC) #13
awong
http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc#newcode94 base/message_loop.cc:94: // |should_leak_task| points to a flag variable that can ...
9 years, 9 months ago (2011-03-23 19:33:01 UTC) #14
willchan no longer on Chromium
LGTM http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/41002/base/message_loop.cc#newcode94 base/message_loop.cc:94: // |should_leak_task| points to a flag variable that ...
9 years, 9 months ago (2011-03-23 19:41:56 UTC) #15
awong
Darin-san...review おねがいします... ^_^
9 years, 8 months ago (2011-04-08 20:33:08 UTC) #16
darin (slow to review)
LGTM http://codereview.chromium.org/6463013/diff/46002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/46002/base/message_loop.cc#newcode748 base/message_loop.cc:748: delayed_run_time(delayed_run_time), sequence_num(0), nit: new line before sequence_num(0)
9 years, 8 months ago (2011-04-09 04:21:58 UTC) #17
awong
addressed nit. Added one question, and running through try bots. http://codereview.chromium.org/6463013/diff/46002/base/message_loop.cc File base/message_loop.cc (right): http://codereview.chromium.org/6463013/diff/46002/base/message_loop.cc#newcode547 ...
9 years, 8 months ago (2011-04-10 15:58:12 UTC) #18
darin (slow to review)
On Sun, Apr 10, 2011 at 8:58 AM, <ajwong@chromium.org> wrote: > addressed nit. Added one ...
9 years, 8 months ago (2011-04-10 22:26:46 UTC) #19
darin (slow to review)
See also: http://code.google.com/p/chromium/issues/detail?id=61131 On Sun, Apr 10, 2011 at 3:26 PM, Darin Fisher <darin@chromium.org> wrote: ...
9 years, 8 months ago (2011-04-10 22:27:48 UTC) #20
Mike Belshe
Sorry to be negative, but I think this change is a step in the wrong ...
9 years, 8 months ago (2011-04-13 03:44:12 UTC) #21
Mike Belshe
http://codereview.chromium.org/6463013/diff/57023/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/6463013/diff/57023/base/message_loop.h#newcode312 base/message_loop.h:312: class BASE_API ClosureObserver { Even if "ClosureObserver" is more ...
9 years, 8 months ago (2011-04-13 04:16:57 UTC) #22
awong
Hi Mike, Thanks for the feedback! I'm actually glad someone is willing to call a ...
9 years, 8 months ago (2011-04-13 19:20:37 UTC) #23
awong
PTAL Renamed PostClosure to PostTask. PostTask() is now an overloaded function. Similarly shifted [Cc]losure to ...
9 years, 8 months ago (2011-04-15 18:08:55 UTC) #24
darin (slow to review)
I'm happy with these renaming changes. I think it makes message_loop.cc a little bit confusing ...
9 years, 8 months ago (2011-04-15 18:35:36 UTC) #25
willchan no longer on Chromium
LGTM, mod darin's comments.
9 years, 8 months ago (2011-04-15 18:37:29 UTC) #26
awong
http://codereview.chromium.org/6463013/diff/71014/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/6463013/diff/71014/base/message_loop.h#newcode174 base/message_loop.h:174: On 2011/04/15 18:35:36, darin wrote: > I think you ...
9 years, 8 months ago (2011-04-15 18:45:56 UTC) #27
darin (slow to review)
Thanks, LGTM On Fri, Apr 15, 2011 at 11:45 AM, <ajwong@chromium.org> wrote: > > http://codereview.chromium.org/6463013/diff/71014/base/message_loop.h ...
9 years, 8 months ago (2011-04-15 19:50:09 UTC) #28
mbelshe
Thanks for taking all the time and bearing with me. LGTM On Fri, Apr 15, ...
9 years, 8 months ago (2011-04-15 22:30:56 UTC) #29
joth
Minor drive-by comments - all fine to keep for another CL if you don't want ...
9 years, 8 months ago (2011-04-16 15:11:57 UTC) #30
awong
Good catches! Addressed comments. http://codereview.chromium.org/6463013/diff/70014/base/message_loop.h File base/message_loop.h (right): http://codereview.chromium.org/6463013/diff/70014/base/message_loop.h#newcode178 base/message_loop.h:178: // There are 2 sets ...
9 years, 8 months ago (2011-04-17 00:34:57 UTC) #31
commit-bot: I haz the power
9 years, 8 months ago (2011-04-20 14:02:51 UTC) #32
Can't apply patch for file base/base/bind_internal_win.h.
A         base/base
patching file base/base/bind_internal_win.h
Hunk #1 FAILED at 15.
Hunk #2 FAILED at 180.
2 out of 2 hunks FAILED -- saving rejects to file
base/base/bind_internal_win.h.rej

Powered by Google App Engine
This is Rietveld 408576698