Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(6)

Issue 2021103002: Statically disallow delete' over heap collection objects. (Closed)

Created:
4 years, 8 months ago by sof
Modified:
4 years, 8 months ago
Reviewers:
oilpan-reviews, haraken
CC:
chromium-reviews, blink-reviews, kouhei+heap_chromium.org, oilpan-reviews, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Statically disallow delete' over heap collection objects. Explicitly deleting heap-allocated heap collection objects isn't allowed nor meaningful, the garbage collector handles their lifetimes precisely. The implementation of 'delete' over these collection objects delegate to a allocator-trait class's free() method, so by not providing it for heap collection objects, compilation fails if 'delete' is ever attempted instantiated & used over these objects. As MSVC performs method instantiation more eagerly, we're unable to statically catch such inappropriate uses of 'delete' at compile time. Rely on a run-time NOTREACHED() instead. R= BUG= Committed: https://crrev.com/47bfa8f726181fcce7265f97727182ee2bdd0283 Cr-Commit-Position: refs/heads/master@{#396788}

Patch Set 1 #

Patch Set 2 : remove HeapAllocator::free().. #

Patch Set 3 : MSVC compatible #

Patch Set 4 : comment improved #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M third_party/WebKit/Source/platform/heap/HeapAllocator.h View 1 2 3 1 chunk +14 lines, -1 line 0 comments Download

Messages

Total messages: 13 (8 generated)
sof
please take a look.
4 years, 8 months ago (2016-05-30 20:44:47 UTC) #6
haraken
LGTM
4 years, 8 months ago (2016-05-30 23:22:35 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2021103002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2021103002/60001
4 years, 8 months ago (2016-05-31 05:25:21 UTC) #9
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-05-31 05:32:34 UTC) #11
commit-bot: I haz the power
4 years, 8 months ago (2016-05-31 05:33:59 UTC) #13
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/47bfa8f726181fcce7265f97727182ee2bdd0283
Cr-Commit-Position: refs/heads/master@{#396788}

Powered by Google App Engine
This is Rietveld 408576698