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

Unified Diff: runtime/vm/bootstrap_nocore.cc

Issue 2820363002: Move Kernel strings into the VM's heap. (Closed)
Patch Set: Created 3 years, 8 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/bootstrap_nocore.cc
diff --git a/runtime/vm/bootstrap_nocore.cc b/runtime/vm/bootstrap_nocore.cc
index c1681877b66be5dbc8644850acaf022d095f7d41..b3d7484eab39b8c32dadaf129f2b956551b96c22 100644
--- a/runtime/vm/bootstrap_nocore.cc
+++ b/runtime/vm/bootstrap_nocore.cc
@@ -88,7 +88,6 @@ RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
Library& library = Library::Handle(zone);
String& dart_name = String::Handle(zone);
- String& kernel_name = String::Handle(zone);
for (intptr_t i = 0; i < bootstrap_library_count; ++i) {
ObjectStore::BootstrapLibraryId id = bootstrap_libraries[i].index;
library = isolate->object_store()->bootstrap_library(id);
@@ -96,7 +95,7 @@ RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
for (intptr_t j = 0; j < program->libraries().length(); ++j) {
kernel::Library* kernel_library = program->libraries()[j];
kernel::String* uri = kernel_library->import_uri();
- kernel_name = Symbols::FromUTF8(thread, uri->buffer(), uri->size());
+ const String& kernel_name = reader.DartSymbol(uri);
if (kernel_name.Equals(dart_name)) {
reader.ReadLibrary(kernel_library);
library.SetLoaded();
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/kernel.h » ('j') | runtime/vm/kernel_binary.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698