| 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 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1452 | 1452 |
| 1453 DART_EXPORT void Dart_SetStickyError(Dart_Handle error) { | 1453 DART_EXPORT void Dart_SetStickyError(Dart_Handle error) { |
| 1454 Thread* thread = Thread::Current(); | 1454 Thread* thread = Thread::Current(); |
| 1455 DARTSCOPE(thread); | 1455 DARTSCOPE(thread); |
| 1456 Isolate* isolate = thread->isolate(); | 1456 Isolate* isolate = thread->isolate(); |
| 1457 CHECK_ISOLATE(isolate); | 1457 CHECK_ISOLATE(isolate); |
| 1458 NoSafepointScope no_safepoint_scope; | 1458 NoSafepointScope no_safepoint_scope; |
| 1459 if (isolate->sticky_error() != Error::null()) { | 1459 if (isolate->sticky_error() != Error::null()) { |
| 1460 FATAL1("%s expects there to be no sticky error.", CURRENT_FUNC); | 1460 FATAL1("%s expects there to be no sticky error.", CURRENT_FUNC); |
| 1461 } | 1461 } |
| 1462 if (!Dart_IsUnhandledExceptionError(error)) { | 1462 if (!::Dart_IsUnhandledExceptionError(error)) { |
| 1463 FATAL1("%s expects the error to be an unhandled exception error.", | 1463 FATAL1("%s expects the error to be an unhandled exception error.", |
| 1464 CURRENT_FUNC); | 1464 CURRENT_FUNC); |
| 1465 } | 1465 } |
| 1466 isolate->SetStickyError( | 1466 isolate->SetStickyError( |
| 1467 Api::UnwrapErrorHandle(Z, error).raw()); | 1467 Api::UnwrapErrorHandle(Z, error).raw()); |
| 1468 } | 1468 } |
| 1469 | 1469 |
| 1470 | 1470 |
| 1471 DART_EXPORT bool Dart_HasStickyError() { | 1471 DART_EXPORT bool Dart_HasStickyError() { |
| 1472 Isolate* isolate = Isolate::Current(); | 1472 Isolate* isolate = Isolate::Current(); |
| (...skipping 5115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6588 | 6588 |
| 6589 DART_EXPORT bool Dart_IsPrecompiledRuntime() { | 6589 DART_EXPORT bool Dart_IsPrecompiledRuntime() { |
| 6590 #if defined(DART_PRECOMPILED_RUNTIME) | 6590 #if defined(DART_PRECOMPILED_RUNTIME) |
| 6591 return true; | 6591 return true; |
| 6592 #else | 6592 #else |
| 6593 return false; | 6593 return false; |
| 6594 #endif | 6594 #endif |
| 6595 } | 6595 } |
| 6596 | 6596 |
| 6597 } // namespace dart | 6597 } // namespace dart |
| OLD | NEW |