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

Unified Diff: src/heap.cc

Issue 83253002: Dispose external string resource on heap teardown. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index b5fe18454e31005d64bb7e611a25dd60449eea67..f28c9260b9d8ebc211381ed971db3bbfaad88977 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -7816,7 +7816,13 @@ void ExternalStringTable::CleanUp() {
void ExternalStringTable::TearDown() {
+ for (int i = 0; i < new_space_strings_.length(); ++i) {
+ heap_->FinalizeExternalString(ExternalString::cast(new_space_strings_[i]));
+ }
new_space_strings_.Free();
+ for (int i = 0; i < old_space_strings_.length(); ++i) {
+ heap_->FinalizeExternalString(ExternalString::cast(old_space_strings_[i]));
+ }
old_space_strings_.Free();
}
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698