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

Unified Diff: runtime/vm/snapshot.cc

Issue 1955453002: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix precompiler handling. 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
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 2f2ca6a533b9cde0fe76207cfeb337ca676946b6..580794e256731ca8d3b5e123b796cd7deff62694 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -253,7 +253,7 @@ RawClass* SnapshotReader::ReadClassId(intptr_t object_id) {
AddBackRef(object_id, &cls, kIsDeserialized);
// Read the library/class information and lookup the class.
str_ ^= ReadObjectImpl(class_header, kAsInlinedObject, kInvalidPatchIndex, 0);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Invalid object found in message.");
}
@@ -280,7 +280,7 @@ RawFunction* SnapshotReader::ReadFunctionId(intptr_t object_id) {
AddBackRef(object_id, &func, kIsDeserialized);
// Read the library/class/function information and lookup the function.
str_ ^= ReadObjectImpl(func_header, kAsInlinedObject, kInvalidPatchIndex, 0);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Expected a library name, but found an invalid name.");
}
@@ -316,7 +316,7 @@ RawObject* SnapshotReader::ReadStaticImplicitClosure(intptr_t object_id,
// Read the library/class/function information and lookup the function.
str_ ^= ReadObjectImpl(kAsInlinedObject);
- library_ = Library::LookupLibrary(str_);
+ library_ = Library::LookupLibrary(thread(), str_);
if (library_.IsNull() || !library_.Loaded()) {
SetReadException("Invalid Library object found in message.");
}

Powered by Google App Engine
This is Rietveld 408576698