Use proper write barrier mode when creating rest parameters.

BUG=chromium:623912

Review-Url: https://codereview.chromium.org/2109603002
Cr-Commit-Position: refs/heads/master@{#37326}
This commit is contained in:
ishell 2016-06-28 05:40:15 -07:00 committed by Commit bot
parent 5e05854019
commit e6076a7951

View File

@ -558,7 +558,7 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) {
{
DisallowHeapAllocation no_gc;
FixedArray* elements = FixedArray::cast(result->elements());
WriteBarrierMode mode = result->GetWriteBarrierMode(no_gc);
WriteBarrierMode mode = elements->GetWriteBarrierMode(no_gc);
for (int i = 0; i < num_elements; i++) {
elements->set(i, *arguments[i + start_index], mode);
}