| Index: runtime/bin/gen_snapshot.cc
|
| ===================================================================
|
| --- runtime/bin/gen_snapshot.cc (revision 775)
|
| +++ runtime/bin/gen_snapshot.cc (working copy)
|
| @@ -92,7 +92,7 @@
|
|
|
| static void* SnapshotCreateCallback(void* data) {
|
| const char* script_name = reinterpret_cast<const char*>(data);
|
| - Dart_Result result;
|
| + Dart_Handle result;
|
| Dart_EnterScope();
|
|
|
| ASSERT(snapshot_filename != NULL);
|
| @@ -101,15 +101,14 @@
|
| // is created.
|
| if (script_name != NULL) {
|
| // Load the specified script.
|
| - result = LoadScript(script_name);
|
| - if (!Dart_IsValidResult(result)) {
|
| - const char* err_msg = Dart_GetErrorCString(result);
|
| + Dart_Handle library = LoadScript(script_name);
|
| + if (!Dart_IsValid(library)) {
|
| + const char* err_msg = Dart_GetError(library);
|
| fprintf(stderr, "Errors encountered while loading script: %s\n", err_msg);
|
| Dart_ExitScope();
|
| exit(255);
|
| }
|
|
|
| - Dart_Handle library = Dart_GetResult(result);
|
| if (!Dart_IsLibrary(library)) {
|
| fprintf(stderr,
|
| "Expected a library when loading script: %s",
|
| @@ -128,8 +127,8 @@
|
| intptr_t size = 0;
|
| // First create the snapshot.
|
| result = Dart_CreateSnapshot(&buffer, &size);
|
| - if (!Dart_IsValidResult(result)) {
|
| - const char* err_msg = Dart_GetErrorCString(result);
|
| + if (!Dart_IsValid(result)) {
|
| + const char* err_msg = Dart_GetError(result);
|
| fprintf(stderr, "Error while creating snapshot: %s\n", err_msg);
|
| Dart_ExitScope();
|
| exit(255);
|
|
|