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

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

Issue 2490233004: - Turn on canonicalization verification after a reload in debug mode. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/isolate_reload.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 "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/text_buffer.h" 10 #include "platform/text_buffer.h"
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 bool force_reload, 1115 bool force_reload,
1116 bool dont_delete_reload_context) { 1116 bool dont_delete_reload_context) {
1117 ASSERT(!IsReloading()); 1117 ASSERT(!IsReloading());
1118 has_attempted_reload_ = true; 1118 has_attempted_reload_ = true;
1119 reload_context_ = new IsolateReloadContext(this, js); 1119 reload_context_ = new IsolateReloadContext(this, js);
1120 reload_context_->Reload(force_reload); 1120 reload_context_->Reload(force_reload);
1121 bool success = !reload_context_->reload_aborted(); 1121 bool success = !reload_context_->reload_aborted();
1122 if (!dont_delete_reload_context) { 1122 if (!dont_delete_reload_context) {
1123 DeleteReloadContext(); 1123 DeleteReloadContext();
1124 } 1124 }
1125 #if defined(DEBUG)
1126 if (success) {
1127 return success;
1128 Thread* thread = Thread::Current();
1129 Isolate* isolate = thread->isolate();
1130 isolate->heap()->CollectAllGarbage();
1131 VerifyCanonicalVisitor check_canonical(thread);
1132 isolate->heap()->IterateObjects(&check_canonical);
1133 }
1134 #endif // DEBUG
1135 return success; 1125 return success;
1136 } 1126 }
1137 1127
1138 1128
1139 void Isolate::DeleteReloadContext() { 1129 void Isolate::DeleteReloadContext() {
1140 // Another thread may be in the middle of GetClassForHeapWalkAt. 1130 // Another thread may be in the middle of GetClassForHeapWalkAt.
1141 Thread* thread = Thread::Current(); 1131 Thread* thread = Thread::Current();
1142 SafepointOperationScope safepoint_scope(thread); 1132 SafepointOperationScope safepoint_scope(thread);
1143 1133
1144 delete reload_context_; 1134 delete reload_context_;
(...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 void IsolateSpawnState::DecrementSpawnCount() { 2954 void IsolateSpawnState::DecrementSpawnCount() {
2965 ASSERT(spawn_count_monitor_ != NULL); 2955 ASSERT(spawn_count_monitor_ != NULL);
2966 ASSERT(spawn_count_ != NULL); 2956 ASSERT(spawn_count_ != NULL);
2967 MonitorLocker ml(spawn_count_monitor_); 2957 MonitorLocker ml(spawn_count_monitor_);
2968 ASSERT(*spawn_count_ > 0); 2958 ASSERT(*spawn_count_ > 0);
2969 *spawn_count_ = *spawn_count_ - 1; 2959 *spawn_count_ = *spawn_count_ - 1;
2970 ml.Notify(); 2960 ml.Notify();
2971 } 2961 }
2972 2962
2973 } // namespace dart 2963 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698