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

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

Issue 1185013005: Assert helper threads do not (yet) attempt to access the "current zone". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/base_isolate.h ('k') | no next file » | 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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « runtime/vm/base_isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698