Commit 554bc07d authored by verwaest's avatar verwaest Committed by Commit bot

Don't roundtrip to JS to update the length. This is 1) faster (although we...

Don't roundtrip to JS to update the length. This is 1) faster (although we don't care) and 2) avoids stackchecks that otherwise make the .Assert fail on stack overflow.

BUG=chromium:502147
LOG=n

Review URL: https://codereview.chromium.org/1189423002

Cr-Commit-Position: refs/heads/master@{#29142}
parent c136032c
......@@ -12018,9 +12018,9 @@ MaybeHandle<Object> JSArray::SetElementsLength(
.Assert();
}
SetProperty(deleted, isolate->factory()->length_string(),
isolate->factory()->NewNumberFromUint(delete_count),
STRICT).Assert();
ElementsAccessor* accessor = deleted->GetElementsAccessor();
accessor->SetLength(deleted, isolate->factory()->NewNumberFromUint(
delete_count)).Check();
}
RETURN_ON_EXCEPTION(
......
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