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

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
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5197 matching lines...) Expand 10 before | Expand all | Expand 10 after
6378 6374
6379 DART_EXPORT bool Dart_IsPrecompiledRuntime() { 6375 DART_EXPORT bool Dart_IsPrecompiledRuntime() {
6380 #if defined(DART_PRECOMPILED_RUNTIME) 6376 #if defined(DART_PRECOMPILED_RUNTIME)
6381 return true; 6377 return true;
6382 #else 6378 #else
6383 return false; 6379 return false;
6384 #endif 6380 #endif
6385 } 6381 }
6386 6382
6387 } // namespace dart 6383 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698