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

Unified Diff: runtime/vm/bootstrap.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.cc
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index f633cdbb1ce40b04213bfa923a2f0f7e738429c1..ebfbe9ce33337df6ecf01a4ae1d6e5e05ea441f9 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -360,7 +360,6 @@ static 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 < kBootstrapLibraryCount; ++i) {
ObjectStore::BootstrapLibraryId id = bootstrap_libraries[i].index;
library = isolate->object_store()->bootstrap_library(id);
@@ -368,7 +367,7 @@ static 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();

Powered by Google App Engine
This is Rietveld 408576698