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

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

Issue 866473003: Expect objects in the VM-heap to be marked on shutdown verification. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 ASSERT(this == Isolate::Current()); 1067 ASSERT(this == Isolate::Current());
1068 ASSERT(top_resource() == NULL); 1068 ASSERT(top_resource() == NULL);
1069 #if defined(DEBUG) 1069 #if defined(DEBUG)
1070 if (heap_ != NULL) { 1070 if (heap_ != NULL) {
1071 // Wait for concurrent GC tasks to finish before final verification. 1071 // Wait for concurrent GC tasks to finish before final verification.
1072 PageSpace* old_space = heap_->old_space(); 1072 PageSpace* old_space = heap_->old_space();
1073 MonitorLocker ml(old_space->tasks_lock()); 1073 MonitorLocker ml(old_space->tasks_lock());
1074 while (old_space->tasks() > 0) { 1074 while (old_space->tasks() > 0) {
1075 ml.Wait(); 1075 ml.Wait();
1076 } 1076 }
1077 heap_->Verify(kForbidMarked); 1077 // The VM isolate keeps all objects marked.
1078 heap_->Verify(this == Dart::vm_isolate() ? kRequireMarked : kForbidMarked);
1078 } 1079 }
1079 #endif // DEBUG 1080 #endif // DEBUG
1080 1081
1081 // Remove this isolate from the list *before* we start tearing it down, to 1082 // Remove this isolate from the list *before* we start tearing it down, to
1082 // avoid exposing it in a state of decay. 1083 // avoid exposing it in a state of decay.
1083 RemoveIsolateFromList(this); 1084 RemoveIsolateFromList(this);
1084 1085
1085 // Create an area where we do have a zone and a handle scope so that we can 1086 // Create an area where we do have a zone and a handle scope so that we can
1086 // call VM functions while tearing this isolate down. 1087 // call VM functions while tearing this isolate down.
1087 { 1088 {
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 serialized_message_, serialized_message_len_); 1631 serialized_message_, serialized_message_len_);
1631 } 1632 }
1632 1633
1633 1634
1634 void IsolateSpawnState::Cleanup() { 1635 void IsolateSpawnState::Cleanup() {
1635 SwitchIsolateScope switch_scope(I); 1636 SwitchIsolateScope switch_scope(I);
1636 Dart::ShutdownIsolate(); 1637 Dart::ShutdownIsolate();
1637 } 1638 }
1638 1639
1639 } // namespace dart 1640 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698