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

Unified Diff: src/objects-debug.cc

Issue 1018283002: Reland "Fix memory leak caused by field type in descriptor array." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 9 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 | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 7e0a747ac7604798847456b8ea80d1ee1fc8f337..4b30e28a94f2229bdad0c2a06000adc5f80b88e8 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -289,9 +289,11 @@ void JSObject::JSObjectVerify() {
if (r.IsSmi()) DCHECK(value->IsSmi());
if (r.IsHeapObject()) DCHECK(value->IsHeapObject());
HeapType* field_type = descriptors->GetFieldType(i);
+ bool type_is_none = field_type->Is(HeapType::None());
+ bool type_is_any = field_type->Is(HeapType::Any());
Jakob Kummerow 2015/04/11 12:00:58 Shouldn't this be the other way round, i.e. HeapTy
if (r.IsNone()) {
- CHECK(field_type->Is(HeapType::None()));
- } else if (!HeapType::Any()->Is(field_type)) {
+ CHECK(type_is_none);
+ } else if (!type_is_any && !(type_is_none && r.IsHeapObject())) {
CHECK(!field_type->NowStable() || field_type->NowContains(value));
}
}
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698