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

Issue 165435: Merge 22826 - Add short circuit case for self assignment, and add virtual des... (Closed)

Created:
11 years, 4 months ago by laforge
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw
Visibility:
Public.

Description

Merge 22826 - Add short circuit case for self assignment, and add virtual destructor Pickle is a base class of Message, which has a virtual destructor, so it is better to have Pickle have a virtual destructor as well. Add more defensive code in the case of self assignment. **IF** self assignment was used, and the target was readonly, then the existing code would have a memory fault. I don't think this is currently possible in use cases, but the defensize code is much better. (per suggestion from CPU on last CL). BUG=17027 BUG=17088 r=cpu Review URL: http://codereview.chromium.org/159800 TBR=jar@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23282

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -3 lines) Patch
MM base/pickle.h View 1 chunk +1 line, -1 line 0 comments Download
MM base/pickle.cc View 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
laforge
11 years, 4 months ago (2009-08-13 05:11:55 UTC) #1
jim.roskind
11 years, 4 months ago (2009-08-13 07:23:40 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698