Commit db3df9f6 authored by Simon Zünd's avatar Simon Zünd Committed by Commit Bot

Remove unnecessary HasOwnProperty check from Array#sort

During deletion in the write-back phase, we do not necessarly need
to check with HasOwnProperty before calling DeleteProperty. Since this
is observable behavior when using proxies, we remove the HasOwnProperty
check to mirror more closely what Spidermonkey does.

R=jgruber@chromium.org

Change-Id: I67768b1d8b13e695b956b2fa0624dcb28fd0664d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809366Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63866}
parent b946521f
......@@ -297,7 +297,6 @@ namespace array {
transitioning builtin Delete<ElementsAccessor: type>(
context: Context, sortState: SortState, index: Smi): Smi {
const receiver = sortState.receiver;
if (!HasProperty_Inline(receiver, index)) return kSuccess;
DeleteProperty(receiver, index, kStrict);
return kSuccess;
}
......
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