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

Issue 141553007: Make ZoneObject::operator delete not public. (Closed)

Created:
6 years, 10 months ago by marja
Modified:
6 years, 10 months ago
Reviewers:
tfarina, ulan
CC:
v8-dev
Visibility:
Public.

Description

Make ZoneObject::operator delete not public. This prevents a n00b mistake of just calling delete on a ZoneObject subclass compile time rather than run time. (Sadly, it doesn't work for second-level subclasses and beyond.) BUG=

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : re #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M src/jsregexp.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M src/zone.h View 1 chunk +1 line, -0 lines 4 comments Download

Messages

Total messages: 5 (0 generated)
ulan
lgtm
6 years, 10 months ago (2014-01-29 15:42:10 UTC) #1
tfarina
https://codereview.chromium.org/141553007/diff/60001/src/zone.h File src/zone.h (right): https://codereview.chromium.org/141553007/diff/60001/src/zone.h#newcode146 src/zone.h:146: // Ideally, the delete operator should be private instead ...
6 years, 10 months ago (2014-01-29 17:39:15 UTC) #2
marja
https://codereview.chromium.org/141553007/diff/60001/src/zone.h File src/zone.h (right): https://codereview.chromium.org/141553007/diff/60001/src/zone.h#newcode146 src/zone.h:146: // Ideally, the delete operator should be private instead ...
6 years, 10 months ago (2014-01-29 17:42:18 UTC) #3
tfarina
https://codereview.chromium.org/141553007/diff/60001/src/zone.h File src/zone.h (right): https://codereview.chromium.org/141553007/diff/60001/src/zone.h#newcode236 src/zone.h:236: void operator delete(void* pointer) { UNREACHABLE(); } do you ...
6 years, 10 months ago (2014-01-29 17:43:42 UTC) #4
tfarina
6 years, 10 months ago (2014-01-29 17:45:00 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/141553007/diff/60001/src/zone.h
File src/zone.h (right):

https://codereview.chromium.org/141553007/diff/60001/src/zone.h#newcode146
src/zone.h:146: // Ideally, the delete operator should be private instead of
On 2014/01/29 17:42:18, marja wrote:
> On 2014/01/29 17:39:15, tfarina wrote:
> > can you update this comment while you are here?
> 
> Actually... I should've read the "MSVC requires the delete operator to be
> public" part. It makes this CL pointless. Nevermind. Closing. Thanks for
> pointing out the comment.
So disregards my latest comment in src/zone.h:236 ;-)

Powered by Google App Engine
This is Rietveld 408576698