Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdio.h> | 5 #include <stdio.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include <dart_api.h> | 8 #include <dart_api.h> |
| 9 | 9 |
| 10 int main(void) { | 10 int main(void) { |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 NULL, | 26 NULL, |
| 27 NULL, | 27 NULL, |
| 28 NULL, | 28 NULL, |
| 29 NULL); | 29 NULL); |
| 30 if (error != NULL) { | 30 if (error != NULL) { |
| 31 fprintf(stderr, "VM initialization failed: %s\n", error); | 31 fprintf(stderr, "VM initialization failed: %s\n", error); |
| 32 fflush(stderr); | 32 fflush(stderr); |
| 33 free(error); | 33 free(error); |
| 34 return -1; | 34 return -1; |
| 35 } | 35 } |
| 36 | |
| 37 fprintf(stderr, "Calling Dart_Cleanup\n"); | |
| 38 fflush(stderr); | |
|
siva
2016/07/13 00:27:16
Would it make sense to replace these fprintf, fflu
zra
2016/07/13 16:04:33
Done.
Hadn't started porting libdart_builtin yet,
| |
| 39 error = Dart_Cleanup(); | |
| 40 if (error != NULL) { | |
| 41 fprintf(stderr, "VM Cleanup failed: %s\n", error); | |
| 42 fflush(stderr); | |
| 43 free(error); | |
| 44 return -1; | |
| 45 } | |
| 46 | |
| 36 fprintf(stderr, "Success!\n"); | 47 fprintf(stderr, "Success!\n"); |
| 37 fflush(stderr); | 48 fflush(stderr); |
| 38 return 0; | 49 return 0; |
| 39 } | 50 } |
| OLD | NEW |