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

Issue 1358373002: Change scoped_ptr::reset()'s behaviour to match unique_ptr. (Closed)

Created:
5 years, 3 months ago by Anand Mistry (off Chromium)
Modified:
5 years, 3 months ago
CC:
dcheng, chrome-apps-syd-reviews_chromium.org, chromium-reviews, gavinp+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change scoped_ptr::reset()'s behaviour to match unique_ptr. unique_ptr::reset() is defined to update its pointer before deleting the old pointer. An interim change was introduced 2 years ago to try and catch cases which relied on the pointer being set after deletion. BUG=176091 Committed: https://crrev.com/0d4ef2583a6f19c3e61be04d36eb1a60b133832c Cr-Commit-Position: refs/heads/master@{#350422}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Expand comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -16 lines) Patch
M base/memory/scoped_ptr.h View 1 chunk +5 lines, -16 lines 0 comments Download
M base/memory/scoped_ptr_unittest.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (4 generated)
Anand Mistry (off Chromium)
5 years, 3 months ago (2015-09-23 02:56:59 UTC) #2
Anand Mistry (off Chromium)
cc dcheng, owner of crbug.com/176091
5 years, 3 months ago (2015-09-23 02:58:17 UTC) #3
Peter Kasting
LGTM! https://codereview.chromium.org/1358373002/diff/1/base/memory/scoped_ptr_unittest.cc File base/memory/scoped_ptr_unittest.cc (right): https://codereview.chromium.org/1358373002/diff/1/base/memory/scoped_ptr_unittest.cc#newcode712 base/memory/scoped_ptr_unittest.cc:712: // Break the cycle by calling |reset()|. Nit: ...
5 years, 3 months ago (2015-09-23 03:09:45 UTC) #4
Anand Mistry (off Chromium)
I'll wait for danakj and/or dcheng to take a look, and won't submit this till ...
5 years, 3 months ago (2015-09-23 04:04:21 UTC) #5
dcheng
lgtm (though I'm not a //base OWNER) Nit: remove the ||'s around {unique,scoped}_ptr::reset in the ...
5 years, 3 months ago (2015-09-23 04:39:25 UTC) #7
Anand Mistry (off Chromium)
On 2015/09/23 04:39:25, dcheng wrote: > lgtm (though I'm not a //base OWNER) > > ...
5 years, 3 months ago (2015-09-23 04:43:45 UTC) #8
danakj
LGTM
5 years, 3 months ago (2015-09-23 18:51:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1358373002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1358373002/20001
5 years, 3 months ago (2015-09-23 22:45:01 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 3 months ago (2015-09-24 00:51:11 UTC) #13
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 00:52:36 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0d4ef2583a6f19c3e61be04d36eb1a60b133832c
Cr-Commit-Position: refs/heads/master@{#350422}

Powered by Google App Engine
This is Rietveld 408576698