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

Issue 2658008: Remove the SetExternalStringDiposeCallback API... (Closed)

Created:
10 years, 6 months ago by Søren Thygesen Gjesse
Modified:
9 years, 7 months ago
Reviewers:
Vitaly Repeshko
CC:
v8-dev
Visibility:
Public.

Description

Remove the SetExternalStringDiposeCallback API Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object. Committed: http://code.google.com/p/v8/source/detail?r=4816

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -73 lines) Patch
M include/v8.h View 1 2 7 chunks +30 lines, -27 lines 0 comments Download
M src/api.cc View 1 1 chunk +0 lines, -8 lines 0 comments Download
M src/heap.h View 1 2 chunks +0 lines, -8 lines 0 comments Download
M src/heap.cc View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/heap-inl.h View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M test/cctest/test-api.cc View 1 3 chunks +24 lines, -23 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
10 years, 6 months ago (2010-06-07 13:55:38 UTC) #1
Vitaly Repeshko
LGTM with comments. Thanks, Vitaly http://codereview.chromium.org/2658008/diff/1/2 File include/v8.h (right): http://codereview.chromium.org/2658008/diff/1/2#newcode1029 include/v8.h:1029: /** nit: Insert a ...
10 years, 6 months ago (2010-06-07 14:24:54 UTC) #2
Søren Thygesen Gjesse
10 years, 6 months ago (2010-06-08 09:35:30 UTC) #3
http://codereview.chromium.org/2658008/diff/1/2
File include/v8.h (right):

http://codereview.chromium.org/2658008/diff/1/2#newcode1029
include/v8.h:1029: /**
On 2010/06/07 14:24:54, Vitaly wrote:
> nit: Insert a black line before the comment.

Done.

http://codereview.chromium.org/2658008/diff/1/2#newcode1031
include/v8.h:1031: * disposed.
On 2010/06/07 14:24:54, Vitaly wrote:
> I think we should add "The default implementation calls delete operator on
> this." so that users of the API can rely on this fact and don't have to call
our
> Dispose.

Updated comment and also made the method protected so that the API user cannot
call it.

http://codereview.chromium.org/2658008/diff/1/7
File test/cctest/test-api.cc (right):

http://codereview.chromium.org/2658008/diff/1/7#newcode619
test/cctest/test-api.cc:619: explicit TestAsciiResourceWithDisposeControl(const
char* data, bool dispose)
On 2010/06/07 14:24:54, Vitaly wrote:
> nit: "explicit" not required.

Done.

Powered by Google App Engine
This is Rietveld 408576698