Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: runtime/vm/isolate.cc

Issue 1408923005: Add IsMutatorThread to the Thread class and use it instead of MutatorThreadIsCurrentThread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/json.h" 10 #include "platform/json.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 712
713 #if defined(DEBUG) 713 #if defined(DEBUG)
714 // static 714 // static
715 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) { 715 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) {
716 ASSERT(isolate == Isolate::Current()); 716 ASSERT(isolate == Isolate::Current());
717 } 717 }
718 718
719 void BaseIsolate::AssertCurrentThreadIsMutator() const { 719 void BaseIsolate::AssertCurrentThreadIsMutator() const {
720 ASSERT(Isolate::Current() == this); 720 ASSERT(Isolate::Current() == this);
721 ASSERT(Isolate::Current()->MutatorThreadIsCurrentThread()); 721 ASSERT(Thread::Current()->IsMutatorThread());
722 } 722 }
723 #endif // defined(DEBUG) 723 #endif // defined(DEBUG)
724 724
725 #if defined(DEBUG) 725 #if defined(DEBUG)
726 #define REUSABLE_HANDLE_SCOPE_INIT(object) \ 726 #define REUSABLE_HANDLE_SCOPE_INIT(object) \
727 reusable_##object##_handle_scope_active_(false), 727 reusable_##object##_handle_scope_active_(false),
728 #else 728 #else
729 #define REUSABLE_HANDLE_SCOPE_INIT(object) 729 #define REUSABLE_HANDLE_SCOPE_INIT(object)
730 #endif // defined(DEBUG) 730 #endif // defined(DEBUG)
731 731
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 serialized_message_, serialized_message_len_); 2601 serialized_message_, serialized_message_len_);
2602 } 2602 }
2603 2603
2604 2604
2605 void IsolateSpawnState::Cleanup() { 2605 void IsolateSpawnState::Cleanup() {
2606 SwitchIsolateScope switch_scope(I); 2606 SwitchIsolateScope switch_scope(I);
2607 Dart::ShutdownIsolate(); 2607 Dart::ShutdownIsolate();
2608 } 2608 }
2609 2609
2610 } // namespace dart 2610 } // namespace dart
OLDNEW
« runtime/vm/debugger.h ('K') | « runtime/vm/isolate.h ('k') | runtime/vm/longjump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698