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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1975423002: Check snapshots for feature compatibility. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 Dart_EntropySource entropy_source, 1149 Dart_EntropySource entropy_source,
1150 Dart_GetVMServiceAssetsArchive get_service_assets) { 1150 Dart_GetVMServiceAssetsArchive get_service_assets) {
1151 if (interrupt != NULL) { 1151 if (interrupt != NULL) {
1152 return strdup("Dart_Initialize: " 1152 return strdup("Dart_Initialize: "
1153 "Setting of interrupt callback is not supported."); 1153 "Setting of interrupt callback is not supported.");
1154 } 1154 }
1155 if (unhandled != NULL) { 1155 if (unhandled != NULL) {
1156 return strdup("Dart_Initialize: " 1156 return strdup("Dart_Initialize: "
1157 "Setting of unhandled exception callback is not supported."); 1157 "Setting of unhandled exception callback is not supported.");
1158 } 1158 }
1159 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, 1159 return Dart::InitOnce(vm_isolate_snapshot,
1160 instructions_snapshot, 1160 instructions_snapshot,
1161 data_snapshot, 1161 data_snapshot,
1162 create, shutdown, 1162 create, shutdown,
1163 thread_exit, 1163 thread_exit,
1164 file_open, file_read, file_write, 1164 file_open, file_read, file_write, file_close,
1165 file_close, entropy_source, 1165 entropy_source,
1166 get_service_assets); 1166 get_service_assets);
1167 if (err_msg != NULL) {
1168 return strdup(err_msg);
1169 }
1170 return NULL;
1171 } 1167 }
1172 1168
1173 1169
1174 DART_EXPORT char* Dart_Cleanup() { 1170 DART_EXPORT char* Dart_Cleanup() {
1175 CHECK_NO_ISOLATE(Isolate::Current()); 1171 CHECK_NO_ISOLATE(Isolate::Current());
1176 const char* err_msg = Dart::Cleanup(); 1172 const char* err_msg = Dart::Cleanup();
1177 if (err_msg != NULL) { 1173 if (err_msg != NULL) {
1178 return strdup(err_msg); 1174 return strdup(err_msg);
1179 } 1175 }
1180 return NULL; 1176 return NULL;
(...skipping 5183 matching lines...) Expand 10 before | Expand all | Expand 10 after
6364 6360
6365 DART_EXPORT bool Dart_IsPrecompiledRuntime() { 6361 DART_EXPORT bool Dart_IsPrecompiledRuntime() {
6366 #if defined(DART_PRECOMPILED_RUNTIME) 6362 #if defined(DART_PRECOMPILED_RUNTIME)
6367 return true; 6363 return true;
6368 #else 6364 #else
6369 return false; 6365 return false;
6370 #endif 6366 #endif
6371 } 6367 }
6372 6368
6373 } // namespace dart 6369 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/snapshot.h » ('j') | runtime/vm/snapshot.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698