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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1947393003: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/precompiler.cc ('k') | runtime/vm/resolver_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 730311eea452912beb0cdef73b867bb966ab055c..196e145491d739915ffebb0af3c72fb2fd857013 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1146,7 +1146,7 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
if ((kind == Snapshot::kScript) && is_in_fullsnapshot) {
// Lookup the object as it should already exist in the heap.
*reader->StringHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
- library = Library::LookupLibrary(*reader->StringHandle());
+ library = Library::LookupLibrary(reader->thread(), *reader->StringHandle());
ASSERT(library.is_in_fullsnapshot());
} else {
// Allocate library object.
@@ -1188,7 +1188,7 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader,
if (!Snapshot::IsFull(kind)) {
// The cache of resolved names in library scope is not serialized.
library.InitResolvedNamesCache(kInitialNameCacheSize);
- library.Register();
+ library.Register(reader->thread());
} else {
library.InitResolvedNamesCache(kInitialNameCacheSize, reader);
}
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/resolver_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698