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

Unified Diff: runtime/bin/main.cc

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/bin/loader.cc ('k') | runtime/bin/vmservice/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 8823eda622710ef676968266ae0ddd1836286a78..a7cc664c605e423bdefb505bfa71d50d60ea4a67 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -17,6 +17,7 @@
#include "bin/extensions.h"
#include "bin/file.h"
#include "bin/isolate_data.h"
+#include "bin/loader.h"
#include "bin/log.h"
#include "bin/platform.h"
#include "bin/process.h"
@@ -726,7 +727,7 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
}
// Set up the library tag handler for this isolate.
- Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler);
+ Dart_Handle result = Dart_SetLibraryTagHandler(Loader::LibraryTagHandler);
CHECK_RESULT(result);
if (Dart_IsServiceIsolate(isolate)) {
@@ -772,11 +773,12 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri,
CHECK_RESULT(result);
} else {
// Load the specified application script into the newly created isolate.
- result = DartUtils::LoadScript(script_uri);
- CHECK_RESULT(result);
-
- // Run event-loop and wait for script loading to complete.
- result = Dart_RunLoop();
+ Dart_Handle uri =
+ DartUtils::ResolveScript(Dart_NewStringFromCString(script_uri));
+ CHECK_RESULT(uri);
+ result = Loader::LibraryTagHandler(Dart_kScriptTag,
+ Dart_Null(),
+ uri);
CHECK_RESULT(result);
Dart_TimelineEvent("LoadScript",
« no previous file with comments | « runtime/bin/loader.cc ('k') | runtime/bin/vmservice/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698