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

Issue 10344012: For types that support Pass(), e.g. scoped_ptr and friends, use Passed in PostTaskAndReplyWithResul… (Closed)

Created:
8 years, 7 months ago by Ryan Sleevi
Modified:
8 years, 7 months ago
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org
Visibility:
Public.

Description

When using PostTaskAndReplyWithResults, if the ResultType is a passed type (eg: scoped_ptr and friends), .Pass() the result to the reply. Because the temporary storage of the result is an implementation detail of PostTaskAndReplyWithResults, its safe to always assume that passed types should be passed. BUG=126008 TEST=TaskRunnerHelpersTest.PostTaskAndReplyWithResultPassed Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135228

Patch Set 1 #

Patch Set 2 : Simpler #

Total comments: 1

Patch Set 3 : Feedback #

Patch Set 4 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -2 lines) Patch
M base/callback_internal.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M base/task_runner_util.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M base/task_runner_util_unittest.cc View 1 2 2 chunks +36 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Ryan Sleevi
I really wanted to use this... so... template foo.
8 years, 7 months ago (2012-05-03 00:35:20 UTC) #1
Ryan Sleevi
Err, I completely missed the existence of CallbackForward. Please let me know if it's too ...
8 years, 7 months ago (2012-05-03 00:45:25 UTC) #2
willchan no longer on Chromium
LGTM, I think your use of CallbackForward() is fine. Please add a comment noting this ...
8 years, 7 months ago (2012-05-03 03:28:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/10344012/10004
8 years, 7 months ago (2012-05-03 19:19:17 UTC) #4
commit-bot: I haz the power
8 years, 7 months ago (2012-05-03 22:34:20 UTC) #5
Change committed as 135228

Powered by Google App Engine
This is Rietveld 408576698