| 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 4393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4404 | 4404 |
| 4405 // --- Exceptions ---- | 4405 // --- Exceptions ---- |
| 4406 | 4406 |
| 4407 DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception) { | 4407 DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception) { |
| 4408 Thread* thread = Thread::Current(); | 4408 Thread* thread = Thread::Current(); |
| 4409 Zone* zone = thread->zone(); | 4409 Zone* zone = thread->zone(); |
| 4410 Isolate* isolate = thread->isolate(); | 4410 Isolate* isolate = thread->isolate(); |
| 4411 CHECK_ISOLATE(isolate); | 4411 CHECK_ISOLATE(isolate); |
| 4412 CHECK_CALLBACK_STATE(thread); | 4412 CHECK_CALLBACK_STATE(thread); |
| 4413 if (Api::IsError(exception)) { | 4413 if (Api::IsError(exception)) { |
| 4414 Dart_PropagateError(exception); | 4414 ::Dart_PropagateError(exception); |
| 4415 } | 4415 } |
| 4416 | 4416 |
| 4417 { | 4417 { |
| 4418 const Instance& excp = Api::UnwrapInstanceHandle(zone, exception); | 4418 const Instance& excp = Api::UnwrapInstanceHandle(zone, exception); |
| 4419 if (excp.IsNull()) { | 4419 if (excp.IsNull()) { |
| 4420 RETURN_TYPE_ERROR(zone, exception, Instance); | 4420 RETURN_TYPE_ERROR(zone, exception, Instance); |
| 4421 } | 4421 } |
| 4422 } | 4422 } |
| 4423 if (thread->top_exit_frame_info() == 0) { | 4423 if (thread->top_exit_frame_info() == 0) { |
| 4424 // There are no dart frames on the stack so it would be illegal to | 4424 // There are no dart frames on the stack so it would be illegal to |
| (...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6021 return Api::Success(); | 6021 return Api::Success(); |
| 6022 } | 6022 } |
| 6023 #endif // DART_PRECOMPILER | 6023 #endif // DART_PRECOMPILER |
| 6024 | 6024 |
| 6025 | 6025 |
| 6026 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6026 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6027 return Dart::IsRunningPrecompiledCode(); | 6027 return Dart::IsRunningPrecompiledCode(); |
| 6028 } | 6028 } |
| 6029 | 6029 |
| 6030 } // namespace dart | 6030 } // namespace dart |
| OLD | NEW |