Commit e6076a79 authored by ishell's avatar ishell Committed by Commit bot

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}
parent 5e058540
...@@ -558,7 +558,7 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) { ...@@ -558,7 +558,7 @@ RUNTIME_FUNCTION(Runtime_NewRestParameter) {
{ {
DisallowHeapAllocation no_gc; DisallowHeapAllocation no_gc;
FixedArray* elements = FixedArray::cast(result->elements()); 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++) { for (int i = 0; i < num_elements; i++) {
elements->set(i, *arguments[i + start_index], mode); elements->set(i, *arguments[i + start_index], mode);
} }
......
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