Commit beed79ae authored by fpizlo@apple.com's avatar fpizlo@apple.com

REGRESSION(r128802): It made some JS tests crash

https://bugs.webkit.org/show_bug.cgi?id=97001

Reviewed by Mark Hahnenberg.

IndexingHeaderInlineMethods was incorrectly assuming that if the HasArrayStorage bit is clear, then that means that indexing payload capacity is zero.

* runtime/IndexingHeaderInlineMethods.h:
(JSC::IndexingHeader::preCapacity):
(JSC::IndexingHeader::indexingPayloadSizeInBytes):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e5a55ded
2012-09-18 Filip Pizlo <fpizlo@apple.com>
REGRESSION(r128802): It made some JS tests crash
https://bugs.webkit.org/show_bug.cgi?id=97001
Reviewed by Mark Hahnenberg.
IndexingHeaderInlineMethods was incorrectly assuming that if the HasArrayStorage bit is clear, then that means that indexing payload capacity is zero.
* runtime/IndexingHeaderInlineMethods.h:
(JSC::IndexingHeader::preCapacity):
(JSC::IndexingHeader::indexingPayloadSizeInBytes):
2012-09-18 Mark Hahnenberg <mhahnenberg@apple.com>
Use WTF::HasTrivialDestructor instead of compiler-specific versions in JSC::NeedsDestructor
......
......@@ -34,7 +34,7 @@ namespace JSC {
inline size_t IndexingHeader::preCapacity(Structure* structure)
{
if (LIKELY(!(structure->indexingType() & HasArrayStorage)))
if (LIKELY(!hasArrayStorage(structure->indexingType())))
return 0;
return arrayStorage()->m_indexBias;
......@@ -42,7 +42,7 @@ inline size_t IndexingHeader::preCapacity(Structure* structure)
inline size_t IndexingHeader::indexingPayloadSizeInBytes(Structure* structure)
{
if (LIKELY(!(structure->indexingType() & HasArrayStorage)))
if (LIKELY(!hasArrayStorage(structure->indexingType())))
return 0;
return ArrayStorage::sizeFor(arrayStorage()->vectorLength());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment