summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap-inl.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-06-08 18:19:00 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-06-09 00:52:06 -0700
commit0bb47b6c975ea1c7eaedc5e80e75c9fd5063e6bc (patch)
tree943955dd13a8ac74d59019c046c5b8e1bc79e17d /deps/v8/src/heap-inl.h
parentde6d663a67dcec8b482e069d967ef4d1a3743c9b (diff)
downloadnode-new-0bb47b6c975ea1c7eaedc5e80e75c9fd5063e6bc.tar.gz
Upgrade V8 to 2.2.15
Diffstat (limited to 'deps/v8/src/heap-inl.h')
-rw-r--r--deps/v8/src/heap-inl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/deps/v8/src/heap-inl.h b/deps/v8/src/heap-inl.h
index 80157d019d..feda2d1114 100644
--- a/deps/v8/src/heap-inl.h
+++ b/deps/v8/src/heap-inl.h
@@ -117,7 +117,14 @@ void Heap::FinalizeExternalString(String* string) {
reinterpret_cast<byte*>(string) +
ExternalString::kResourceOffset -
kHeapObjectTag);
- delete *resource_addr;
+
+ // Dispose of the C++ object.
+ if (external_string_dispose_callback_ != NULL) {
+ external_string_dispose_callback_(*resource_addr);
+ } else {
+ delete *resource_addr;
+ }
+
// Clear the resource pointer in the string.
*resource_addr = NULL;
}