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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 } | 728 } |
729 | 729 |
730 DART_EXPORT bool Dart_Initialize( | 730 DART_EXPORT bool Dart_Initialize( |
731 Dart_IsolateCreateCallback create, | 731 Dart_IsolateCreateCallback create, |
732 Dart_IsolateInterruptCallback interrupt, | 732 Dart_IsolateInterruptCallback interrupt, |
733 Dart_IsolateUnhandledExceptionCallback unhandled, | 733 Dart_IsolateUnhandledExceptionCallback unhandled, |
734 Dart_IsolateShutdownCallback shutdown, | 734 Dart_IsolateShutdownCallback shutdown, |
735 Dart_FileOpenCallback file_open, | 735 Dart_FileOpenCallback file_open, |
736 Dart_FileReadCallback file_read, | 736 Dart_FileReadCallback file_read, |
737 Dart_FileWriteCallback file_write, | 737 Dart_FileWriteCallback file_write, |
738 Dart_FileCloseCallback file_close) { | 738 Dart_FileCloseCallback file_close, |
| 739 Dart_EntropySource entropy_source) { |
739 const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown, | 740 const char* err_msg = Dart::InitOnce(create, interrupt, unhandled, shutdown, |
740 file_open, file_read, file_write, | 741 file_open, file_read, file_write, |
741 file_close); | 742 file_close, entropy_source); |
742 if (err_msg != NULL) { | 743 if (err_msg != NULL) { |
743 OS::PrintErr("Dart_Initialize: %s\n", err_msg); | 744 OS::PrintErr("Dart_Initialize: %s\n", err_msg); |
744 return false; | 745 return false; |
745 } | 746 } |
746 return true; | 747 return true; |
747 } | 748 } |
748 | 749 |
749 | 750 |
750 DART_EXPORT bool Dart_Cleanup() { | 751 DART_EXPORT bool Dart_Cleanup() { |
751 CHECK_NO_ISOLATE(Isolate::Current()); | 752 CHECK_NO_ISOLATE(Isolate::Current()); |
(...skipping 3675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4427 } | 4428 } |
4428 { | 4429 { |
4429 NoGCScope no_gc; | 4430 NoGCScope no_gc; |
4430 RawObject* raw_obj = obj.raw(); | 4431 RawObject* raw_obj = obj.raw(); |
4431 isolate->heap()->SetPeer(raw_obj, peer); | 4432 isolate->heap()->SetPeer(raw_obj, peer); |
4432 } | 4433 } |
4433 return Api::Success(); | 4434 return Api::Success(); |
4434 } | 4435 } |
4435 | 4436 |
4436 } // namespace dart | 4437 } // namespace dart |
OLD | NEW |