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

Issue 2645004: Add an API to control the disposal of external string resources... (Closed)

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

Description

Add an API to control the disposal of external string resources A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine. Committed: http://code.google.com/p/v8/source/detail?r=4805

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -13 lines) Patch
M include/v8.h View 1 2 5 chunks +31 lines, -12 lines 0 comments Download
M src/api.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/heap.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M src/heap.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/heap-inl.h View 1 1 chunk +8 lines, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
Should we find a better name to this API than SetExternalStringResourceCollectedCallback? It is not really ...
10 years, 6 months ago (2010-06-07 06:46:18 UTC) #1
Mads Ager (chromium)
LGTM http://codereview.chromium.org/2645004/diff/1/2 File include/v8.h (right): http://codereview.chromium.org/2645004/diff/1/2#newcode1125 include/v8.h:1125: * resource. When the external string is no ...
10 years, 6 months ago (2010-06-07 08:06:21 UTC) #2
Søren Thygesen Gjesse
10 years, 6 months ago (2010-06-07 08:37:58 UTC) #3
http://codereview.chromium.org/2645004/diff/1/2
File include/v8.h (right):

http://codereview.chromium.org/2645004/diff/1/2#newcode1125
include/v8.h:1125: * resource. When the external string is no longer live on
V8's heap and is
On 2010/06/07 08:06:22, Mads Ager wrote:
> Remove "and is collected"?

Done.

http://codereview.chromium.org/2645004/diff/1/2#newcode1126
include/v8.h:1126: * collected the resource will be disposed either by delete
called from the
On 2010/06/07 08:06:22, Mads Ager wrote:
> This explanation is a bit convoluted. How about:
> 
> ... the resource will be disposed. If a disposal callback has been set using
> SetExternalStringDiposeCallback this callback will be called to dispose the
> resource. Otherwise, V8 will dispose the resource using the C++ delete
operator.
> 
> 
> ?

Done.

http://codereview.chromium.org/2645004/diff/1/2#newcode1149
include/v8.h:1149: * resource. When the external string is no longer live on
V8's heap and is
On 2010/06/07 08:06:22, Mads Ager wrote:
> Ditto.

Done.

http://codereview.chromium.org/2645004/diff/1/2#newcode1256
include/v8.h:1256: typedef void (*ExternalStringResourceCollectedCallback)
On 2010/06/07 08:06:22, Mads Ager wrote:
> How about "ExternalStringDisposeCallback"?

Done.

http://codereview.chromium.org/2645004/diff/1/2#newcode2477
include/v8.h:2477: * Set a callback to be called when an external string
external string is no
On 2010/06/07 08:06:22, Mads Ager wrote:
> Delete one occurrence of "external string".

Done.

http://codereview.chromium.org/2645004/diff/1/2#newcode2480
include/v8.h:2480: * the the resource using the C++ delete operator.
On 2010/06/07 08:06:22, Mads Ager wrote:
> the the -> the

Done.

Powered by Google App Engine
This is Rietveld 408576698