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

Unified Diff: runtime/vm/thread.cc

Issue 2360963005: Relax zone allocation assertion (Closed)
Patch Set: fschneider pre-review Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/zone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 42df5357d8254b55e7cc496071f723072af84082..d3534af507c72cf44fe3800a27c77b6ecaaeb426 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -21,6 +21,7 @@
#include "vm/thread_interrupter.h"
#include "vm/thread_registry.h"
#include "vm/timeline.h"
+#include "vm/zone.h"
namespace dart {
@@ -423,6 +424,19 @@ uword Thread::GetAndClearInterrupts() {
}
+bool Thread::ZoneIsOwnedByThread(Zone* zone) const {
+ ASSERT(zone != NULL);
+ Zone* current = zone_;
+ while (current != NULL) {
+ if (current == zone) {
+ return true;
+ }
+ current = current->previous();
+ }
+ return false;
+}
+
+
void Thread::DeferOOBMessageInterrupts() {
MonitorLocker ml(thread_lock_);
defer_oob_messages_count_++;
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698