| OLD | NEW |
| 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 if (params->version != DART_INITIALIZE_PARAMS_CURRENT_VERSION) { | 1187 if (params->version != DART_INITIALIZE_PARAMS_CURRENT_VERSION) { |
| 1188 return strdup( | 1188 return strdup( |
| 1189 "Dart_Initialize: " | 1189 "Dart_Initialize: " |
| 1190 "Invalid Dart_InitializeParams version."); | 1190 "Invalid Dart_InitializeParams version."); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 return Dart::InitOnce( | 1193 return Dart::InitOnce( |
| 1194 params->vm_snapshot_data, params->vm_snapshot_instructions, | 1194 params->vm_snapshot_data, params->vm_snapshot_instructions, |
| 1195 params->create, params->shutdown, params->thread_exit, params->file_open, | 1195 params->create, params->shutdown, params->cleanup, params->thread_exit, |
| 1196 params->file_read, params->file_write, params->file_close, | 1196 params->file_open, params->file_read, params->file_write, |
| 1197 params->entropy_source, params->get_service_assets); | 1197 params->file_close, params->entropy_source, params->get_service_assets); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 | 1200 |
| 1201 DART_EXPORT char* Dart_Cleanup() { | 1201 DART_EXPORT char* Dart_Cleanup() { |
| 1202 CHECK_NO_ISOLATE(Isolate::Current()); | 1202 CHECK_NO_ISOLATE(Isolate::Current()); |
| 1203 const char* err_msg = Dart::Cleanup(); | 1203 const char* err_msg = Dart::Cleanup(); |
| 1204 if (err_msg != NULL) { | 1204 if (err_msg != NULL) { |
| 1205 return strdup(err_msg); | 1205 return strdup(err_msg); |
| 1206 } | 1206 } |
| 1207 return NULL; | 1207 return NULL; |
| (...skipping 5623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6831 } | 6831 } |
| 6832 | 6832 |
| 6833 | 6833 |
| 6834 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6834 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6835 #ifndef PRODUCT | 6835 #ifndef PRODUCT |
| 6836 Profiler::DumpStackTrace(context); | 6836 Profiler::DumpStackTrace(context); |
| 6837 #endif | 6837 #endif |
| 6838 } | 6838 } |
| 6839 | 6839 |
| 6840 } // namespace dart | 6840 } // namespace dart |
| OLD | NEW |