OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/longjump.h" | 5 #include "vm/longjump.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // A zero is the default return value from setting up a LongJumpScope | 46 // A zero is the default return value from setting up a LongJumpScope |
47 // using Set. | 47 // using Set. |
48 ASSERT(value != 0); | 48 ASSERT(value != 0); |
49 ASSERT(IsSafeToJump()); | 49 ASSERT(IsSafeToJump()); |
50 | 50 |
51 Thread* thread = Thread::Current(); | 51 Thread* thread = Thread::Current(); |
52 Isolate* isolate = thread->isolate(); | 52 Isolate* isolate = thread->isolate(); |
53 | 53 |
54 #if defined(DEBUG) | 54 #if defined(DEBUG) |
55 #define CHECK_REUSABLE_HANDLE(name) \ | 55 #define CHECK_REUSABLE_HANDLE(name) \ |
56 ASSERT(!isolate->reusable_##name##_handle_scope_active()); | 56 ASSERT(!thread->reusable_##name##_handle_scope_active()); |
57 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE) | 57 REUSABLE_HANDLE_LIST(CHECK_REUSABLE_HANDLE) |
58 #undef CHECK_REUSABLE_HANDLE | 58 #undef CHECK_REUSABLE_HANDLE |
59 #endif // defined(DEBUG) | 59 #endif // defined(DEBUG) |
60 | 60 |
61 // Remember the error in the sticky error of this isolate. | 61 // Remember the error in the sticky error of this isolate. |
62 isolate->object_store()->set_sticky_error(error); | 62 isolate->object_store()->set_sticky_error(error); |
63 | 63 |
64 // Destruct all the active StackResource objects. | 64 // Destruct all the active StackResource objects. |
65 StackResource::UnwindAbove(thread, top_); | 65 StackResource::UnwindAbove(thread, top_); |
66 longjmp(environment_, value); | 66 longjmp(environment_, value); |
67 UNREACHABLE(); | 67 UNREACHABLE(); |
68 } | 68 } |
69 | 69 |
70 } // namespace dart | 70 } // namespace dart |
OLD | NEW |