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 "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "vm/code_observers.h" | 10 #include "vm/code_observers.h" |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 api_flags->enable_type_checks = type_checks(); | 596 api_flags->enable_type_checks = type_checks(); |
597 api_flags->enable_asserts = asserts(); | 597 api_flags->enable_asserts = asserts(); |
598 } | 598 } |
599 | 599 |
600 | 600 |
601 #if defined(DEBUG) | 601 #if defined(DEBUG) |
602 // static | 602 // static |
603 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) { | 603 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) { |
604 ASSERT(isolate == Isolate::Current()); | 604 ASSERT(isolate == Isolate::Current()); |
605 } | 605 } |
| 606 |
| 607 void BaseIsolate::AssertCurrentThreadIsMutator() const { |
| 608 ASSERT(Isolate::Current() == this); |
| 609 ASSERT(Isolate::Current()->mutator_thread() == Thread::Current()); |
| 610 } |
606 #endif // defined(DEBUG) | 611 #endif // defined(DEBUG) |
607 | 612 |
608 #if defined(DEBUG) | 613 #if defined(DEBUG) |
609 #define REUSABLE_HANDLE_SCOPE_INIT(object) \ | 614 #define REUSABLE_HANDLE_SCOPE_INIT(object) \ |
610 reusable_##object##_handle_scope_active_(false), | 615 reusable_##object##_handle_scope_active_(false), |
611 #else | 616 #else |
612 #define REUSABLE_HANDLE_SCOPE_INIT(object) | 617 #define REUSABLE_HANDLE_SCOPE_INIT(object) |
613 #endif // defined(DEBUG) | 618 #endif // defined(DEBUG) |
614 | 619 |
615 #define REUSABLE_HANDLE_INITIALIZERS(object) \ | 620 #define REUSABLE_HANDLE_INITIALIZERS(object) \ |
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 serialized_message_, serialized_message_len_); | 2081 serialized_message_, serialized_message_len_); |
2077 } | 2082 } |
2078 | 2083 |
2079 | 2084 |
2080 void IsolateSpawnState::Cleanup() { | 2085 void IsolateSpawnState::Cleanup() { |
2081 SwitchIsolateScope switch_scope(I); | 2086 SwitchIsolateScope switch_scope(I); |
2082 Dart::ShutdownIsolate(); | 2087 Dart::ShutdownIsolate(); |
2083 } | 2088 } |
2084 | 2089 |
2085 } // namespace dart | 2090 } // namespace dart |
OLD | NEW |