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

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

Issue 1260283007: Fix race and limit access to mutator_thread_. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove debug print. Created 5 years, 4 months 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 610
611 #if defined(DEBUG) 611 #if defined(DEBUG)
612 // static 612 // static
613 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) { 613 void BaseIsolate::AssertCurrent(BaseIsolate* isolate) {
614 ASSERT(isolate == Isolate::Current()); 614 ASSERT(isolate == Isolate::Current());
615 } 615 }
616 616
617 void BaseIsolate::AssertCurrentThreadIsMutator() const { 617 void BaseIsolate::AssertCurrentThreadIsMutator() const {
618 ASSERT(Isolate::Current() == this); 618 ASSERT(Isolate::Current() == this);
619 ASSERT(Isolate::Current()->mutator_thread() == Thread::Current()); 619 ASSERT(Isolate::Current()->MutatorThreadIsCurrentThread());
620 } 620 }
621 #endif // defined(DEBUG) 621 #endif // defined(DEBUG)
622 622
623 #if defined(DEBUG) 623 #if defined(DEBUG)
624 #define REUSABLE_HANDLE_SCOPE_INIT(object) \ 624 #define REUSABLE_HANDLE_SCOPE_INIT(object) \
625 reusable_##object##_handle_scope_active_(false), 625 reusable_##object##_handle_scope_active_(false),
626 #else 626 #else
627 #define REUSABLE_HANDLE_SCOPE_INIT(object) 627 #define REUSABLE_HANDLE_SCOPE_INIT(object)
628 #endif // defined(DEBUG) 628 #endif // defined(DEBUG)
629 629
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 serialized_message_, serialized_message_len_); 2169 serialized_message_, serialized_message_len_);
2170 } 2170 }
2171 2171
2172 2172
2173 void IsolateSpawnState::Cleanup() { 2173 void IsolateSpawnState::Cleanup() {
2174 SwitchIsolateScope switch_scope(I); 2174 SwitchIsolateScope switch_scope(I);
2175 Dart::ShutdownIsolate(); 2175 Dart::ShutdownIsolate();
2176 } 2176 }
2177 2177
2178 } // namespace dart 2178 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698