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 "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 return Api::CastIsolate(I); | 1197 return Api::CastIsolate(I); |
1198 } | 1198 } |
1199 *error = strdup(error_obj.ToErrorCString()); | 1199 *error = strdup(error_obj.ToErrorCString()); |
1200 // We exit the API scope entered above. | 1200 // We exit the API scope entered above. |
1201 Dart_ExitScope(); | 1201 Dart_ExitScope(); |
1202 } | 1202 } |
1203 Dart::ShutdownIsolate(); | 1203 Dart::ShutdownIsolate(); |
1204 return reinterpret_cast<Dart_Isolate>(NULL); | 1204 return reinterpret_cast<Dart_Isolate>(NULL); |
1205 } | 1205 } |
1206 | 1206 |
| 1207 DART_EXPORT void Dart_IsolateFlagsInitialize(Dart_IsolateFlags* flags) { |
| 1208 Isolate::FlagsInitialize(flags); |
| 1209 } |
| 1210 |
1207 DART_EXPORT Dart_Isolate | 1211 DART_EXPORT Dart_Isolate |
1208 Dart_CreateIsolate(const char* script_uri, | 1212 Dart_CreateIsolate(const char* script_uri, |
1209 const char* main, | 1213 const char* main, |
1210 const uint8_t* snapshot_data, | 1214 const uint8_t* snapshot_data, |
1211 const uint8_t* snapshot_instructions, | 1215 const uint8_t* snapshot_instructions, |
1212 Dart_IsolateFlags* flags, | 1216 Dart_IsolateFlags* flags, |
1213 void* callback_data, | 1217 void* callback_data, |
1214 char** error) { | 1218 char** error) { |
1215 return CreateIsolate(script_uri, main, snapshot_data, snapshot_instructions, | 1219 return CreateIsolate(script_uri, main, snapshot_data, snapshot_instructions, |
1216 -1, NULL, flags, callback_data, error); | 1220 -1, NULL, flags, callback_data, error); |
(...skipping 5524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6741 #endif | 6745 #endif |
6742 } | 6746 } |
6743 | 6747 |
6744 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6748 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6745 #ifndef PRODUCT | 6749 #ifndef PRODUCT |
6746 Profiler::DumpStackTrace(context); | 6750 Profiler::DumpStackTrace(context); |
6747 #endif | 6751 #endif |
6748 } | 6752 } |
6749 | 6753 |
6750 } // namespace dart | 6754 } // namespace dart |
OLD | NEW |