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

Unified Diff: src/execution.cc

Issue 4116005: Make ExternalizeStringExtension free its data on exit to please (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 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 | test/mjsunit/string-externalize.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
===================================================================
--- src/execution.cc (revision 5717)
+++ src/execution.cc (working copy)
@@ -797,6 +797,7 @@
if (result && !string->IsSymbol()) {
i::ExternalStringTable::AddString(*string);
}
+ if (!result) delete resource;
} else {
uc16* data = new uc16[string->length()];
String::WriteToFlat(*string, data, 0, string->length());
@@ -806,6 +807,7 @@
if (result && !string->IsSymbol()) {
i::ExternalStringTable::AddString(*string);
}
+ if (!result) delete resource;
}
if (!result) {
return v8::ThrowException(v8::String::New("externalizeString() failed."));
« no previous file with comments | « no previous file | test/mjsunit/string-externalize.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698