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

Issue 10579030: Fix scoped_ptr::Pass to not rely on undefined behavior (Closed)

Created:
8 years, 6 months ago by dmichael (off chromium)
Modified:
8 years, 6 months ago
Reviewers:
brettw, awong
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org, brettw, bbudge
Visibility:
Public.

Description

Fix scoped_ptr::Pass to not rely on undefined behavior Invoking "other.release()" where other is of type RValue invokes undefined behavior, because the given pointer is actually of type scoped_ptr<C>. With the NaCl toolchain, this doesn't work as intended, and the pointed-to object gets destructed twice. BUG=116317 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143150

Patch Set 1 #

Patch Set 2 : add comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -3 lines) Patch
M base/memory/scoped_ptr.h View 1 3 chunks +18 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
dmichael (off chromium)
8 years, 6 months ago (2012-06-19 22:42:49 UTC) #1
dmichael (off chromium)
(see also http://code.google.com/p/nativeclient/issues/detail?id=2859 )
8 years, 6 months ago (2012-06-19 22:43:51 UTC) #2
awong
The fix as is looks okay, but I didn't think it was necessary. Are we ...
8 years, 6 months ago (2012-06-19 22:53:36 UTC) #3
awong
lgtm with one comment. dmichael: Can you add a comment saying that these are needed ...
8 years, 6 months ago (2012-06-19 23:37:06 UTC) #4
dmichael (off chromium)
On 2012/06/19 22:53:36, awong wrote: > The fix as is looks okay, but I didn't ...
8 years, 6 months ago (2012-06-20 02:33:53 UTC) #5
dmichael (off chromium)
On 2012/06/19 23:37:06, awong wrote: > lgtm with one comment. > > dmichael: Can you ...
8 years, 6 months ago (2012-06-20 03:02:03 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/10579030/2002
8 years, 6 months ago (2012-06-20 03:02:25 UTC) #7
commit-bot: I haz the power
Presubmit check for 10579030-2002 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-06-20 03:02:29 UTC) #8
brettw
lgtm
8 years, 6 months ago (2012-06-20 03:22:40 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/10579030/2002
8 years, 6 months ago (2012-06-20 03:26:56 UTC) #10
commit-bot: I haz the power
8 years, 6 months ago (2012-06-20 05:47:15 UTC) #11
Change committed as 143150

Powered by Google App Engine
This is Rietveld 408576698