[webkit-reviews] review granted: [Bug 114235] JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots incorrectly : [Attachment 196995] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 8 23:52:36 PDT 2013
Geoffrey Garen <ggaren at apple.com> has granted Mark Hahnenberg
<mhahnenberg at apple.com>'s request for review:
Bug 114235: JSObject::getOwnNonIndexPropertyNames calculates numCacheableSlots
incorrectly
https://bugs.webkit.org/show_bug.cgi?id=114235
Attachment 196995: Patch
https://bugs.webkit.org/attachment.cgi?id=196995&action=review
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=196995&action=review
r=me
> Source/JavaScriptCore/runtime/JSObject.cpp:1537
> + size_t numCacheableSlotsBeforeStaticProperties =
propertyNames.numCacheableSlots();
> getClassPropertyNames(exec, object->classInfo(), propertyNames, mode,
object->staticFunctionsReified());
> - size_t preStructurePropertyNamesCount = propertyNames.size();
> +
> + bool canCachePropertiesFromStructure = propertyNames.size() ==
numCacheableSlotsBeforeStaticProperties;
I think it would be simpler, and slightly more correct, just to test
!propertyNames.size() at this point. The assumption behind cacheable slots is
that they start indexing from zero.
More information about the webkit-reviews
mailing list