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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2995423002: Allow the VM to read Kernel files with external libraries (Closed)
Patch Set: Created 3 years, 4 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/kernel_reader.h ('k') | tools/patch_sdk.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index bbb439a7267cdc866c32cb785b7d13c20521b14b..6a6904065a658097198026dfa6473cad47dcd5fd 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -253,6 +253,8 @@ void KernelReader::ReadLibrary(intptr_t kernel_offset) {
LibraryHelper library_helper(&builder_);
library_helper.ReadUntilIncluding(LibraryHelper::kCanonicalName);
Library& library = LookupLibrary(library_helper.canonical_name_);
+ // The Kernel library is external implies that it is already loaded.
+ ASSERT(!library_helper.IsExternal() || library.Loaded());
if (library.Loaded()) return;
library_helper.ReadUntilIncluding(LibraryHelper::kName);
« no previous file with comments | « runtime/vm/kernel_reader.h ('k') | tools/patch_sdk.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698