| 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 "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 OS::SNPrint(chars, len, "%s$%s", script_uri, main); | 1279 OS::SNPrint(chars, len, "%s$%s", script_uri, main); |
| 1280 return chars; | 1280 return chars; |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 | 1283 |
| 1284 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, | 1284 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, |
| 1285 const char* main, | 1285 const char* main, |
| 1286 const uint8_t* snapshot, | 1286 const uint8_t* snapshot, |
| 1287 void* callback_data, | 1287 void* callback_data, |
| 1288 char** error) { | 1288 char** error) { |
| 1289 TRACE_API_CALL(CURRENT_FUNC); | 1289 CHECK_NO_ISOLATE(Isolate::Current()); |
| 1290 char* isolate_name = BuildIsolateName(script_uri, main); | 1290 char* isolate_name = BuildIsolateName(script_uri, main); |
| 1291 Isolate* isolate = Dart::CreateIsolate(isolate_name); | 1291 Isolate* isolate = Dart::CreateIsolate(isolate_name); |
| 1292 free(isolate_name); | 1292 free(isolate_name); |
| 1293 { | 1293 { |
| 1294 StackZone zone(isolate); | 1294 StackZone zone(isolate); |
| 1295 HANDLESCOPE(isolate); | 1295 HANDLESCOPE(isolate); |
| 1296 const Error& error_obj = | 1296 const Error& error_obj = |
| 1297 Error::Handle(isolate, | 1297 Error::Handle(isolate, |
| 1298 Dart::InitializeIsolate(snapshot, callback_data)); | 1298 Dart::InitializeIsolate(snapshot, callback_data)); |
| 1299 if (error_obj.IsNull()) { | 1299 if (error_obj.IsNull()) { |
| (...skipping 4237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5537 | 5537 |
| 5538 | 5538 |
| 5539 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5539 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
| 5540 const char* name, | 5540 const char* name, |
| 5541 Dart_ServiceRequestCallback callback, | 5541 Dart_ServiceRequestCallback callback, |
| 5542 void* user_data) { | 5542 void* user_data) { |
| 5543 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 5543 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
| 5544 } | 5544 } |
| 5545 | 5545 |
| 5546 } // namespace dart | 5546 } // namespace dart |
| OLD | NEW |