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

Issue 172101: Move MessageLoop TaskQueues to pointers.

Created:
11 years, 3 months ago by Dean McNamee
Modified:
11 years, 3 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Move MessageLoop TaskQueues to pointers. We previously called std::swap on two std::queues. However, the C++ spec does not define swap specializations for queues, so this does a full temporary and copy. Instead add a level of indirection and swap the pointers. BUG=20204

Patch Set 1 #

Total comments: 1

Patch Set 2 : Move to scoped pointers. #

Patch Set 3 : scoped_ptr swap. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -16 lines) Patch
M base/message_loop.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M base/message_loop.cc View 1 2 5 chunks +17 lines, -14 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Dean McNamee
11 years, 3 months ago (2009-09-02 13:08:54 UTC) #1
Craig
http://codereview.chromium.org/172101/diff/1/2 File base/message_loop.cc (right): http://codereview.chromium.org/172101/diff/1/2#newcode84 Line 84: incoming_queue_(new TaskQueue), Do you have to call delete ...
11 years, 3 months ago (2009-09-02 13:20:30 UTC) #2
Dean McNamee
On Wed, Sep 2, 2009 at 3:20 PM, <craig.schlenter@chromium.org> wrote: > > http://codereview.chromium.org/172101/diff/1/2 > File ...
11 years, 3 months ago (2009-09-02 15:43:05 UTC) #3
darin (slow to review)
I posted an alternative fix here: http://codereview.chromium.org/190006 This is something Dean and I discussed this ...
11 years, 3 months ago (2009-09-02 16:29:57 UTC) #4
Dean McNamee
11 years, 3 months ago (2009-09-02 19:56:16 UTC) #5
Your alternative LGTM.

On Wed, Sep 2, 2009 at 6:30 PM, <darin@chromium.org> wrote:
> I posted an alternative fix here:
> http://codereview.chromium.org/190006
>
> This is something Dean and I discussed this morning just before he
> logged off.
>
> http://codereview.chromium.org/172101
>

Powered by Google App Engine
This is Rietveld 408576698