DescriptionIntroduce safe interface to "copy and grow" FixedArray.
This introduces a CopyFixedArrayAndGrow method on Factory that takes
the "grow amount" instead of the "new size" as an argument. The new
interface is safer because it allows for mutations by the GC that
potentially trim the source array.
This also fixes a bug in SharedFunctionInfo::AddToOptimizedCodeMap
where the aformentioned scenario led to unused entries within the
optimized code map.
Note that FixedArray::CopySize is hereby deprecated because it is
considered unsafe and should no longer be used.
R=hpayer@chromium.org
TEST=mjsunit/regress/regress-crbug-513507
BUG=chromium:513507
LOG=n
Committed: https://crrev.com/bcad9b547d00320f818ce6ff08016a02ce0b6e5b
Cr-Commit-Position: refs/heads/master@{#30012}
Patch Set 1 #Patch Set 2 : Added a cctest. #
Total comments: 4
Patch Set 3 : Addressed nits. #
Messages
Total messages: 10 (2 generated)
|