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); |