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/+/1809366 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#63866}
This commit is contained in:
parent
b946521f18
commit
db3df9f67c
1
third_party/v8/builtins/array-sort.tq
vendored
1
third_party/v8/builtins/array-sort.tq
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user