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

Unified Diff: src/property.h

Issue 955063002: Fix memory leak caused by field type in descriptor array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove unused var in release. Created 5 years, 10 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-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index 5f8e6da40722f200d8f5081e6f48cd8b6f8f2622..c6556b3fc1432c9eaf1a5a175a54f09671fc04b2 100644
--- a/src/property.h
+++ b/src/property.h
@@ -79,10 +79,14 @@ class DataDescriptor FINAL : public Descriptor {
PropertyAttributes attributes, Representation representation)
: Descriptor(key, HeapType::Any(key->GetIsolate()), attributes, DATA,
representation, field_index) {}
- DataDescriptor(Handle<Name> key, int field_index, Handle<HeapType> field_type,
+ // The field type is either a simple type or a map wrapped in a weak cell.
+ DataDescriptor(Handle<Name> key, int field_index,
+ Handle<Object> wrapped_field_type,
PropertyAttributes attributes, Representation representation)
- : Descriptor(key, field_type, attributes, DATA, representation,
- field_index) {}
+ : Descriptor(key, wrapped_field_type, attributes, DATA, representation,
+ field_index) {
+ DCHECK(wrapped_field_type->IsSmi() || wrapped_field_type->IsWeakCell());
+ }
};
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698