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

Unified Diff: src/objects.cc

Issue 18658: Added handling of hidden prototype objects when collecting local properties f... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 1124)
+++ src/objects.cc (working copy)
@@ -5695,10 +5695,10 @@
// Fill in the names of local properties into the supplied storage. The main
// purpose of this function is to provide reflection information for the object
// mirrors.
-void JSObject::GetLocalPropertyNames(FixedArray* storage) {
- ASSERT(storage->length() ==
- NumberOfLocalProperties(static_cast<PropertyAttributes>(NONE)));
- int index = 0;
+void JSObject::GetLocalPropertyNames(FixedArray* storage, int index) {
+ ASSERT(storage->length() >=
+ NumberOfLocalProperties(static_cast<PropertyAttributes>(NONE)) -
+ index);
if (HasFastProperties()) {
for (DescriptorReader r(map()->instance_descriptors());
!r.eos();
@@ -5707,7 +5707,7 @@
storage->set(index++, r.GetKey());
}
}
- ASSERT(storage->length() == index);
+ ASSERT(storage->length() >= index);
} else {
property_dictionary()->CopyKeysTo(storage);
}
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698