Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 62dad8df706c2b265eab7e43f24e72c07c22c1c0..b893379ed51924c65dd8fc489acb354343546225 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2569,6 +2569,7 @@ void Isolate::CheckDetachedContextsAfterGC() { |
int new_length = 0; |
for (int i = 0; i < length; i += 2) { |
int mark_sweeps = Smi::cast(detached_contexts->get(i))->value(); |
+ DCHECK(detached_contexts->get(i + 1)->IsWeakCell()); |
WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1)); |
if (!cell->cleared()) { |
detached_contexts->set(new_length, Smi::FromInt(mark_sweeps + 1)); |
@@ -2582,6 +2583,7 @@ void Isolate::CheckDetachedContextsAfterGC() { |
length - new_length, length); |
for (int i = 0; i < new_length; i += 2) { |
int mark_sweeps = Smi::cast(detached_contexts->get(i))->value(); |
+ DCHECK(detached_contexts->get(i + 1)->IsWeakCell()); |
WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1)); |
if (mark_sweeps > 3) { |
PrintF("detached context 0x%p\n survived %d GCs (leak?)\n", |