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

Issue 30693010: Use copy-swap idiom for GURL::operator= (Closed)

Created:
7 years, 2 months ago by cjhopman
Modified:
7 years, 2 months ago
CC:
chromium-reviews, Jeffrey Yasskin
Visibility:
Public.

Description

Use copy-swap idiom for GURL::operator= All the work to correctly handle ownership and internal state of GURL is already done by the copy-constructor, destructor, and GURL::Swap. Repeating that work for GURL::operator= is just another place where we might get it wrong. BUG=309975 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=230829

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -20 lines) Patch
M url/gurl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M url/gurl.cc View 1 2 1 chunk +2 lines, -12 lines 0 comments Download
M url/gurl_unittest.cc View 1 2 chunks +42 lines, -7 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
cjhopman
darin: * jyasskin: didn't see your comment on the other change until after uploading this, ...
7 years, 2 months ago (2013-10-22 17:11:36 UTC) #1
cjhopman
https://codereview.chromium.org/30693010/diff/1/url/gurl.cc File url/gurl.cc (right): https://codereview.chromium.org/30693010/diff/1/url/gurl.cc#newcode172 url/gurl.cc:172: GURL copy(other); This is less subtle than taking the ...
7 years, 2 months ago (2013-10-22 17:14:01 UTC) #2
akalin
lgtm https://codereview.chromium.org/30693010/diff/1/url/gurl.cc File url/gurl.cc (right): https://codereview.chromium.org/30693010/diff/1/url/gurl.cc#newcode172 url/gurl.cc:172: GURL copy(other); On 2013/10/22 17:14:01, cjhopman wrote: > ...
7 years, 2 months ago (2013-10-22 17:56:40 UTC) #3
Jeffrey Yasskin
https://codereview.chromium.org/30693010/diff/1/url/gurl.cc File url/gurl.cc (right): https://codereview.chromium.org/30693010/diff/1/url/gurl.cc#newcode172 url/gurl.cc:172: GURL copy(other); On 2013/10/22 17:14:01, cjhopman wrote: > This ...
7 years, 2 months ago (2013-10-22 18:02:54 UTC) #4
cjhopman
https://codereview.chromium.org/30693010/diff/1/url/gurl.cc File url/gurl.cc (right): https://codereview.chromium.org/30693010/diff/1/url/gurl.cc#newcode172 url/gurl.cc:172: GURL copy(other); On 2013/10/22 18:02:54, Jeffrey Yasskin wrote: > ...
7 years, 2 months ago (2013-10-22 19:03:44 UTC) #5
akalin
lgtm
7 years, 2 months ago (2013-10-22 21:07:08 UTC) #6
akalin
On 2013/10/22 21:07:08, akalin wrote: > lgtm darin, jeffrey, ping?
7 years, 2 months ago (2013-10-23 20:01:09 UTC) #7
Jeffrey Yasskin
Oops, I was taking akalin's lgtm as enough. lgtm from me too.
7 years, 2 months ago (2013-10-24 00:27:13 UTC) #8
darin (slow to review)
lgtm
7 years, 2 months ago (2013-10-24 02:15:40 UTC) #9
akalin
On 2013/10/24 02:15:40, darin wrote: > lgtm Probably needs to be rebased before checking in
7 years, 2 months ago (2013-10-24 06:58:21 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/30693010/250001
7 years, 2 months ago (2013-10-24 16:50:54 UTC) #11
commit-bot: I haz the power
7 years, 2 months ago (2013-10-24 21:56:36 UTC) #12
Message was sent while issue was closed.
Change committed as 230829

Powered by Google App Engine
This is Rietveld 408576698