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

Issue 10836215: Rename template parameter in callback from RunType to BindRunType. (Closed)

Created:
8 years, 4 months ago by xiaomings
Modified:
8 years, 4 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, brettw-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Rename template parameter in callback from RunType to BindRunType. The original code is correct. The fix is a work around for mips gcc 4.3.2. The constructor of Callback is a template. In the context of the constructor, there are two type named RunType. One is its second template parameter, the other is a typedef inside Callback. The correct compiler will pick the "local" one, i.e. the template parameter. However, gcc 4.3.2 on mips incorrectly uses the typedef. The solution is to rename the template parameter. After discussing with ajwong, we decide to push the work around up stream as it is cleaner not to shadow names anyways. BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151383

Patch Set 1 #

Patch Set 2 : Modify .pump, regenerate .h from .pump. #

Total comments: 1

Patch Set 3 : Fixed comment in .pump. #

Patch Set 4 : Fix comment according to CR's comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -29 lines) Patch
M base/callback.h View 1 2 3 9 chunks +33 lines, -25 lines 0 comments Download
M base/callback.h.pump View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
xiaomings
Please review the changes, thanks :)
8 years, 4 months ago (2012-08-13 18:55:50 UTC) #1
xiaomings
Please review the change, thanks :)
8 years, 4 months ago (2012-08-13 19:36:56 UTC) #2
awong
https://chromiumcodereview.appspot.com/10836215/diff/3002/base/callback.h File base/callback.h (right): https://chromiumcodereview.appspot.com/10836215/diff/3002/base/callback.h#newcode126 base/callback.h:126: // base::Callback<void(int)> cb = base::Bind(&MyFunc, 23); Oops. Please fix ...
8 years, 4 months ago (2012-08-13 19:38:49 UTC) #3
awong
In the CL description, and you add a sentence at the end that says something ...
8 years, 4 months ago (2012-08-13 19:39:42 UTC) #4
xiaomings
Fix the comment according to your comment.
8 years, 4 months ago (2012-08-13 21:09:12 UTC) #5
xiaomings
Fixed comment according to your comment.
8 years, 4 months ago (2012-08-13 21:09:43 UTC) #6
awong
LGTM Darin: can you do OWNERS since Will is out?
8 years, 4 months ago (2012-08-13 21:19:49 UTC) #7
darin (slow to review)
LGTM
8 years, 4 months ago (2012-08-13 21:37:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiaomings@google.com/10836215/1002
8 years, 4 months ago (2012-08-13 21:38:07 UTC) #9
commit-bot: I haz the power
8 years, 4 months ago (2012-08-13 23:11:51 UTC) #10
Change committed as 151383

Powered by Google App Engine
This is Rietveld 408576698