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

Unified Diff: runtime/bin/main.cc

Issue 2842913002: Fix the front end compiler tests. (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
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | runtime/vm/kernel_reader.cc » ('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 6db292561426465875733467a9b28f552687fea3..119de5a8bb7083f76470f4d9213c0ea8de61008a 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -932,13 +932,18 @@ static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate,
if (is_main_isolate && (snapshot_deps_filename != NULL)) {
isolate_data->set_dependencies(new MallocGrowableArray<char*>());
}
- Dart_Isolate isolate =
- kernel_platform != NULL
- ? Dart_CreateIsolateFromKernel(script_uri, main, kernel_platform,
- flags, isolate_data, error)
- : Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
- isolate_snapshot_instructions, flags,
- isolate_data, error);
+ Dart_Isolate isolate = NULL;
+ if (kernel_platform != NULL) {
+ isolate = Dart_CreateIsolateFromKernel(script_uri, main, kernel_platform,
+ flags, isolate_data, error);
+ } else if (kernel_program != NULL) {
+ isolate = Dart_CreateIsolateFromKernel(script_uri, main, kernel_program,
+ flags, isolate_data, error);
+ } else {
+ isolate = Dart_CreateIsolate(script_uri, main, isolate_snapshot_data,
+ isolate_snapshot_instructions, flags,
+ isolate_data, error);
+ }
if (isolate == NULL) {
delete isolate_data;
return NULL;
@@ -1024,7 +1029,7 @@ static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate,
Dart_Handle uri =
DartUtils::ResolveScript(Dart_NewStringFromCString(script_uri));
CHECK_RESULT(uri);
- if (kernel_platform == NULL) {
+ if (kernel_program == NULL) {
result = Loader::LibraryTagHandler(Dart_kScriptTag, Dart_Null(), uri);
CHECK_RESULT(result);
} else {
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | runtime/vm/kernel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698