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

Unified Diff: runtime/vm/isolate_reload.cc

Issue 2899323002: Heap::kNew-space allocations discovered by experimental code called transitively from parser
Patch Set: Created 3 years, 7 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 | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload.cc
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 414d09381d200b545b70c0a38051459728be7825..52734d07bffa45fb1d391d5e9cecadc2b0c9a817 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -572,12 +572,14 @@ void IsolateReloadContext::Reload(bool force_reload,
// Preallocate storage for maps.
old_classes_set_storage_ =
HashTables::New<UnorderedHashSet<ClassMapTraits> >(4);
- class_map_storage_ = HashTables::New<UnorderedHashMap<ClassMapTraits> >(4);
+ class_map_storage_ =
+ HashTables::New<UnorderedHashMap<ClassMapTraits> >(4, Heap::kOld);
old_libraries_set_storage_ =
HashTables::New<UnorderedHashSet<LibraryMapTraits> >(4);
library_map_storage_ =
HashTables::New<UnorderedHashMap<LibraryMapTraits> >(4);
- become_map_storage_ = HashTables::New<UnorderedHashMap<BecomeMapTraits> >(4);
+ become_map_storage_ =
+ HashTables::New<UnorderedHashMap<BecomeMapTraits> >(4, Heap::kOld);
// Keep a separate array for enum mappings to avoid having to invoke
// hashCode on the instances.
become_enum_mappings_ = GrowableObjectArray::New(Heap::kOld);
@@ -1760,7 +1762,7 @@ RawLibrary* IsolateReloadContext::OldLibraryOrNullBaseMoved(
const intptr_t old_prefix_length = old_url_prefix.Length();
const String& new_url = String::Handle(replacement_or_new.url());
const String& suffix =
- String::Handle(String::SubString(new_url, prefix_length));
+ String::Handle(String::SubString(new_url, prefix_length, Heap::kOld));
if (!new_url.StartsWith(url_prefix)) {
return Library::null();
}
@@ -1776,7 +1778,7 @@ RawLibrary* IsolateReloadContext::OldLibraryOrNullBaseMoved(
if (!old_url.StartsWith(old_url_prefix)) {
continue;
}
- old_suffix ^= String::SubString(old_url, old_prefix_length);
+ old_suffix ^= String::SubString(old_url, old_prefix_length, Heap::kOld);
if (old_suffix.IsNull()) {
continue;
}
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698