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

Unified Diff: runtime/vm/kernel_isolate.cc

Issue 2665753002: Reapply "Create an app snapshot of the Dart front end." (Closed)
Patch Set: . Created 3 years, 11 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/kernel_isolate.cc
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index a4af37fa4bdc33c1a8146ae0087bbd4eb3cc8511..92efa294f8fc26ad5b80848ed992f97f2f12ffc6 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -74,10 +74,8 @@ class RunKernelTask : public ThreadPool::Task {
isolate = reinterpret_cast<Isolate*>(create_callback(
KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
if (isolate == NULL) {
- if (FLAG_trace_kernel) {
- OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
- error);
- }
+ OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
+ error);
KernelIsolate::SetKernelIsolate(NULL);
KernelIsolate::FinishedInitializing();
return;
@@ -151,24 +149,20 @@ class RunKernelTask : public ThreadPool::Task {
const Library& root_library =
Library::Handle(Z, I->object_store()->root_library());
if (root_library.IsNull()) {
- if (FLAG_trace_kernel) {
- OS::Print(DART_KERNEL_ISOLATE_NAME
- ": Embedder did not install a script.");
- }
+ OS::Print(DART_KERNEL_ISOLATE_NAME
+ ": Embedder did not install a script.");
// Kernel isolate is not supported by embedder.
return false;
}
ASSERT(!root_library.IsNull());
- const String& entry_name = String::Handle(Z, String::New("main"));
+ const String& entry_name = String::Handle(Z, String::New("start"));
ASSERT(!entry_name.IsNull());
const Function& entry = Function::Handle(
Z, root_library.LookupFunctionAllowPrivate(entry_name));
if (entry.IsNull()) {
// Kernel isolate is not supported by embedder.
- if (FLAG_trace_kernel) {
- OS::Print(DART_KERNEL_ISOLATE_NAME
- ": Embedder did not provide a main function.");
- }
+ OS::Print(DART_KERNEL_ISOLATE_NAME
+ ": Embedder did not provide a main function.");
return false;
}
ASSERT(!entry.IsNull());
@@ -177,12 +171,10 @@ class RunKernelTask : public ThreadPool::Task {
ASSERT(!result.IsNull());
if (result.IsError()) {
// Kernel isolate did not initialize properly.
- if (FLAG_trace_kernel) {
- const Error& error = Error::Cast(result);
- OS::Print(DART_KERNEL_ISOLATE_NAME
- ": Calling main resulted in an error: %s",
- error.ToErrorCString());
- }
+ const Error& error = Error::Cast(result);
+ OS::Print(DART_KERNEL_ISOLATE_NAME
+ ": Calling main resulted in an error: %s",
+ error.ToErrorCString());
return false;
}
ASSERT(result.IsReceivePort());

Powered by Google App Engine
This is Rietveld 408576698