| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 DART_CHECK_VALID(library); | 737 DART_CHECK_VALID(library); |
| 738 result = Dart_LoadSource(library, resolved_script_uri, sourceText); | 738 result = Dart_LoadSource(library, resolved_script_uri, sourceText); |
| 739 } | 739 } |
| 740 if (Dart_IsError(result)) Dart_PropagateError(result); | 740 if (Dart_IsError(result)) Dart_PropagateError(result); |
| 741 } | 741 } |
| 742 | 742 |
| 743 | 743 |
| 744 // Callback function that gets called from dartutils when there are | 744 // Callback function that gets called from dartutils when there are |
| 745 // no more outstanding load requests. | 745 // no more outstanding load requests. |
| 746 void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) { | 746 void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) { |
| 747 Dart_Handle res = Dart_FinalizeLoading(); | 747 Dart_Handle res = Dart_FinalizeLoading(true); |
| 748 if (Dart_IsError(res)) { | 748 if (Dart_IsError(res)) { |
| 749 Dart_PropagateError(res); | 749 Dart_PropagateError(res); |
| 750 } | 750 } |
| 751 } | 751 } |
| 752 | 752 |
| 753 | 753 |
| 754 Dart_Handle DartUtils::LoadSource(Dart_Handle library, | 754 Dart_Handle DartUtils::LoadSource(Dart_Handle library, |
| 755 Dart_Handle url, | 755 Dart_Handle url, |
| 756 Dart_LibraryTag tag, | 756 Dart_LibraryTag tag, |
| 757 const char* url_string) { | 757 const char* url_string) { |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 new CObjectString(CObject::NewString(os_error->message())); | 1153 new CObjectString(CObject::NewString(os_error->message())); |
| 1154 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); | 1154 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); |
| 1155 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); | 1155 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); |
| 1156 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); | 1156 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); |
| 1157 result->SetAt(2, error_message); | 1157 result->SetAt(2, error_message); |
| 1158 return result; | 1158 return result; |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 } // namespace bin | 1161 } // namespace bin |
| 1162 } // namespace dart | 1162 } // namespace dart |
| OLD | NEW |