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

Unified Diff: src/mark-compact.cc

Issue 69029: If an external string enters the symbol table, make sure to set the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
===================================================================
--- src/mark-compact.cc (revision 1724)
+++ src/mark-compact.cc (working copy)
@@ -404,15 +404,19 @@
ExternalString::kResourceOffset -
kHeapObjectTag;
if (is_two_byte) {
- v8::String::ExternalStringResource* resource =
- *reinterpret_cast<v8::String::ExternalStringResource**>
+ v8::String::ExternalStringResource** resource =
+ reinterpret_cast<v8::String::ExternalStringResource**>
(resource_addr);
- delete resource;
+ delete *resource;
+ // Clear the resource pointer in the symbol.
+ *resource = NULL;
} else {
- v8::String::ExternalAsciiStringResource* resource =
- *reinterpret_cast<v8::String::ExternalAsciiStringResource**>
+ v8::String::ExternalAsciiStringResource** resource =
+ reinterpret_cast<v8::String::ExternalAsciiStringResource**>
(resource_addr);
- delete resource;
+ delete *resource;
+ // Clear the resource pointer in the symbol.
+ *resource = NULL;
}
}
// Set the entry to null_value (as deleted).
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698