| Index: runtime/bin/gen_snapshot.cc
|
| diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
|
| index 5dd431bb4d4ac530c9c496ebb52ea5cc3cf371f1..ff2d3b877dea73a4c35fa688fa2f6faa5127a185 100644
|
| --- a/runtime/bin/gen_snapshot.cc
|
| +++ b/runtime/bin/gen_snapshot.cc
|
| @@ -351,17 +351,17 @@ static Dart_Handle CreateSnapshotLibraryTagHandler(Dart_LibraryTag tag,
|
| if (Dart_IsError(file_path)) {
|
| return file_path;
|
| }
|
| -
|
| - Dart_Handle builtin_lib =
|
| - Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
|
| - Dart_Handle result = DartUtils::LoadSourceAsync(library,
|
| - url,
|
| - tag,
|
| - builtin_lib);
|
| - if (Dart_IsError(result)) {
|
| - return result;
|
| + const char* raw_path = DartUtils::GetStringValue(file_path);
|
| + Dart_Handle source = DartUtils::ReadStringFromFile(raw_path);
|
| + if (Dart_IsError(source)) {
|
| + return source;
|
| + }
|
| + if (tag == Dart_kImportTag) {
|
| + return Dart_LoadLibrary(url, source, 0, 0);
|
| + } else {
|
| + ASSERT(tag == Dart_kSourceTag);
|
| + return Dart_LoadSource(library, url, source, 0, 0);
|
| }
|
| - return Dart_RunLoop();
|
| }
|
|
|
|
|
|
|