Zero out CopiedBlocks on initialization
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 03:10:03 +0000 (03:10 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 03:10:03 +0000 (03:10 +0000)
commit13bbb9d70134553d240fe1a2486c27981d4cc4ba
treecd8302f81243cf6b3e7317e63fc34e88517b7924
parent5a67c05d4972729d7f3febfe7cc4caff3eec89ec
Zero out CopiedBlocks on initialization
https://bugs.webkit.org/show_bug.cgi?id=79199

Reviewed by Filip Pizlo.

Made CopyBlocks zero their payloads during construction. This allows
JSArray to avoid having to manually clear its backing store upon allocation
and also alleviates any future pain with regard to the garbage collector trying
to mark what it thinks are values in what is actually uninitialized memory.

* heap/CopiedBlock.h:
(JSC::CopiedBlock::CopiedBlock):
* runtime/JSArray.cpp:
(JSC::JSArray::finishCreation):
(JSC::JSArray::tryFinishCreationUninitialized):
(JSC::JSArray::increaseVectorLength):
(JSC::JSArray::unshiftCountSlowCase):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/CopiedBlock.h
Source/JavaScriptCore/runtime/JSArray.cpp