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

Unified Diff: src/heap-inl.h

Issue 2658008: Remove the SetExternalStringDiposeCallback API... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
===================================================================
--- src/heap-inl.h (revision 4813)
+++ src/heap-inl.h (working copy)
@@ -118,11 +118,9 @@
ExternalString::kResourceOffset -
kHeapObjectTag);
- // Dispose of the C++ object.
- if (external_string_dispose_callback_ != NULL) {
- external_string_dispose_callback_(*resource_addr);
- } else {
- delete *resource_addr;
+ // Dispose of the C++ object if it has not already been disposed.
+ if (*resource_addr != NULL) {
+ (*resource_addr)->Dispose();
}
// Clear the resource pointer in the string.
« no previous file with comments | « src/heap.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698