• Joyee Cheung's avatar
    [ic] fix handling of existing properties in Define{Keyed|Named}OwnIC · 4ee68d81
    Joyee Cheung authored
    - When the property being defined with DefineKeyedOwnIC or
      DefineNamedOwnIC already exists, we should use the slow path to
      check if the operation is allowed in case the property is
      non-configurable or Object.preventExtensions() has been called on
      the property.
    - Since KeyedStoreIC:Store() reuses StoreIC::Store() when the key is a
      name, we should use Runtime::DefineObjectOwnProperty() for
      DefineKeyedOwnIC too.
    - When dealing with public fields, Runtime::DefineObjectOwnProperty()
      should use JSReceiver::CreateDataProperty() instead of
      Object::SetProperty() for the specified semantics. This patch also
      adds JSReceiver::AddPrivateField() for it and StoreIC::Store to
      define private fields without triggering traps or checking
      extensibility.
    - To emit a more specific error message when redefining properties
      on non-extensible objects, Object::AddDataProperty() now also takes
      a EnforceDefineSemantics enum to distinguish between set and define.
    - Drive-by: fix JSReceiver::CheckIfCanDefine() which should check for
      extensibility even if the configurability check passes.
    
    Bug: chromium:1259950, v8:9888
    Change-Id: Ib1bc851ffd4b9c3a0e98cac96dafe743c08ee37e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517934Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#79603}
    4ee68d81
Name
Last commit
Last update
..
bigint Loading commit data...
regress Loading commit data...
weakrefs Loading commit data...
aggregate-error.js Loading commit data...
array-concat-array-proto-getter.js Loading commit data...
array-concat-array-proto.js Loading commit data...
array-concat-object-proto-dict-getter.js Loading commit data...
array-concat-object-proto-dict.js Loading commit data...
array-concat-object-proto-generic-dict.js Loading commit data...
array-concat-object-proto.js Loading commit data...
array-findlast-unscopables.js Loading commit data...
array-flat-species.js Loading commit data...
array-flat.js Loading commit data...
array-flatMap-species.js Loading commit data...
array-flatMap.js Loading commit data...
array-prototype-findlast.js Loading commit data...
array-prototype-findlastindex.js Loading commit data...
array-prototype-groupby.js Loading commit data...
array-prototype-groupbytomap.js Loading commit data...
array-sort-comparefn.js Loading commit data...
async-await-optimization.js Loading commit data...
async-for-of-non-iterable.js Loading commit data...
async-from-sync-iterator-next-tick-count.js Loading commit data...
async-from-sync-iterator-return-tick-count.js Loading commit data...
async-from-sync-iterator-throw-tick-count.js Loading commit data...
async-from-sync-iterator.js Loading commit data...
async-generators-basic.js Loading commit data...
async-generators-resume-return.js Loading commit data...
async-generators-return.js Loading commit data...
async-generators-throw-caught.js Loading commit data...
async-generators-yield.js Loading commit data...
async-iterators-resolve.js Loading commit data...
atomics-on-arraybuffer-detach.js Loading commit data...
atomics-value-check.js Loading commit data...
atomics-waitasync-1thread-2timeout.js Loading commit data...
atomics-waitasync-1thread-buffer-out-of-scope-timeout.js Loading commit data...
atomics-waitasync-1thread-promise-out-of-scope.js Loading commit data...
atomics-waitasync-1thread-timeout.js Loading commit data...
atomics-waitasync-1thread-timeouts-and-no-timeouts.js Loading commit data...
atomics-waitasync-1thread-wake-up-all.js Loading commit data...
atomics-waitasync-1thread-wake-up-fifo.js Loading commit data...
atomics-waitasync-1thread-wake-up-simple.js Loading commit data...
atomics-waitasync-helpers.js Loading commit data...
atomics-waitasync-worker-shutdown-before-wait-finished-2-waits.js Loading commit data...
atomics-waitasync-worker-shutdown-before-wait-finished-2-workers.js Loading commit data...
atomics-waitasync-worker-shutdown-before-wait-finished-no-timeout.js Loading commit data...
atomics-waitasync-worker-shutdown-before-wait-finished-timeout.js Loading commit data...
atomics-waitasync.js Loading commit data...
atomics.js Loading commit data...
bigintarray-keyedstore-tobigint.js Loading commit data...
block-lazy-compile.js Loading commit data...
class-static-blocks.js Loading commit data...
dataview-accessors.js Loading commit data...
define-private-class-field-stress.js Loading commit data...
error-cause.js Loading commit data...
eval-param-scoping.js Loading commit data...
for-await-of.js Loading commit data...
function-tostring.js Loading commit data...
futex.js Loading commit data...
generators-reduced.js Loading commit data...
generators.js Loading commit data...
global-configurable.js Loading commit data...
global-writable.js Loading commit data...
global.js Loading commit data...
harmony-string-pad-end.js Loading commit data...
harmony-string-pad-start.js Loading commit data...
has-own.js Loading commit data...
hashbang-eval.js Loading commit data...
import-from-compilation-errored.js Loading commit data...
import-from-evaluation-errored.js Loading commit data...
import-from-fetch-errored.js Loading commit data...
import-from-instantiation-errored.js Loading commit data...
index-fields-nonextensible-global-proxy-no-lazy-feedback.js Loading commit data...
index-fields-nonextensible-global-proxy.js Loading commit data...
logical-assignment-function-name.js Loading commit data...
logical-assignment.js Loading commit data...
module-parsing-eval.mjs Loading commit data...
modules-import-1.mjs Loading commit data...
modules-import-10.mjs Loading commit data...
modules-import-11.mjs Loading commit data...
modules-import-12.mjs Loading commit data...
modules-import-13.mjs Loading commit data...
modules-import-14.mjs Loading commit data...
modules-import-15-top-level-await.mjs Loading commit data...
modules-import-15.mjs Loading commit data...
modules-import-16.mjs Loading commit data...
modules-import-17.mjs Loading commit data...
modules-import-2.mjs Loading commit data...
modules-import-3.mjs Loading commit data...
modules-import-4.mjs Loading commit data...
modules-import-5.mjs Loading commit data...
modules-import-6.mjs Loading commit data...
modules-import-7.mjs Loading commit data...
modules-import-8.mjs Loading commit data...
modules-import-9.mjs Loading commit data...
modules-import-assertions-1.mjs Loading commit data...
modules-import-assertions-2.mjs Loading commit data...
modules-import-assertions-3.mjs Loading commit data...
modules-import-assertions-4.mjs Loading commit data...
modules-import-assertions-dynamic-1.mjs Loading commit data...
modules-import-assertions-dynamic-10.mjs Loading commit data...
modules-import-assertions-dynamic-11.mjs Loading commit data...
modules-import-assertions-dynamic-12.mjs Loading commit data...
modules-import-assertions-dynamic-2.mjs Loading commit data...
modules-import-assertions-dynamic-3.mjs Loading commit data...
modules-import-assertions-dynamic-4.mjs Loading commit data...
modules-import-assertions-dynamic-5.mjs Loading commit data...
modules-import-assertions-dynamic-6.mjs Loading commit data...
modules-import-assertions-dynamic-7.mjs Loading commit data...
modules-import-assertions-dynamic-8.mjs Loading commit data...
modules-import-assertions-dynamic-9.mjs Loading commit data...
modules-import-large.mjs Loading commit data...
modules-import-meta.mjs Loading commit data...
modules-import-namespace.mjs Loading commit data...
modules-import-rqstd-order-async-cycle.mjs Loading commit data...
modules-import-rqstd-order-async-subgraph.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-1.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-2.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-3.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-4.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-5.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-6.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-7.mjs Loading commit data...
modules-import-rqstd-order-top-level-await-8.mjs Loading commit data...
modules-import-top-level-await-1.mjs Loading commit data...
modules-import-top-level-await-2.mjs Loading commit data...
modules-import-top-level-await-3.mjs Loading commit data...
modules-import-top-level-await-4.mjs Loading commit data...
modules-import-top-level-await-5.mjs Loading commit data...
modules-import-top-level-await-6.mjs Loading commit data...
modules-import-top-level-await-7.mjs Loading commit data...
modules-import-top-level-await-8.mjs Loading commit data...
modules-import-top-level-await-cycle.mjs Loading commit data...
modules-import-top-level-await-exception-1.mjs Loading commit data...
modules-import-top-level-await-exception-2.mjs Loading commit data...
modules-import-top-level-await-exception-3.mjs Loading commit data...
modules-skip-1-rqstd-order-indirect-top-level-await.mjs Loading commit data...
modules-skip-1-rqstd-order-indirect-unreached-top-level-await.mjs Loading commit data...
modules-skip-1-rqstd-order-top-level-await.mjs Loading commit data...
modules-skip-1-rqstd-order-unreached-top-level-await.mjs Loading commit data...
modules-skip-1-rqstd-order.mjs Loading commit data...
modules-skip-1-top-level-await-cycle.mjs Loading commit data...
modules-skip-1-top-level-await.mjs Loading commit data...
modules-skip-1.json Loading commit data...
modules-skip-1.mjs Loading commit data...
modules-skip-10.mjs Loading commit data...
modules-skip-11.mjs Loading commit data...
modules-skip-12.mjs Loading commit data...
modules-skip-13.mjs Loading commit data...
modules-skip-2-rqstd-order-indirect-top-level-await.mjs Loading commit data...
modules-skip-2-rqstd-order-top-level-await.mjs Loading commit data...
modules-skip-2-rqstd-order.mjs Loading commit data...
modules-skip-2-top-level-await-cycle.mjs Loading commit data...
modules-skip-2-top-level-await.mjs Loading commit data...
modules-skip-2.mjs Loading commit data...
modules-skip-3-rqstd-order-indirect-top-level-await.mjs Loading commit data...
modules-skip-3-rqstd-order-top-level-await.mjs Loading commit data...
modules-skip-3-rqstd-order.mjs Loading commit data...
modules-skip-3-top-level-await-cycle.mjs Loading commit data...
modules-skip-3-top-level-await.mjs Loading commit data...
modules-skip-3.mjs Loading commit data...
modules-skip-4-rqstd-order-indirect-top-level-await.mjs Loading commit data...
modules-skip-4-rqstd-order-top-level-await.mjs Loading commit data...
modules-skip-4-rqstd-order.mjs Loading commit data...
modules-skip-4-top-level-await-cycle.mjs Loading commit data...
modules-skip-4-top-level-await.mjs Loading commit data...
modules-skip-4.mjs Loading commit data...
modules-skip-5-top-level-await.mjs Loading commit data...
modules-skip-5.mjs Loading commit data...
modules-skip-6-top-level-await.mjs Loading commit data...
modules-skip-6.mjs Loading commit data...
modules-skip-7-top-level-await.mjs Loading commit data...
modules-skip-7.mjs Loading commit data...
modules-skip-8.mjs Loading commit data...
modules-skip-9.mjs Loading commit data...
modules-skip-async-cycle-1.mjs Loading commit data...
modules-skip-async-cycle-2.mjs Loading commit data...
modules-skip-async-cycle-3.mjs Loading commit data...
modules-skip-async-cycle-leaf.mjs Loading commit data...
modules-skip-async-cycle-start.mjs Loading commit data...
modules-skip-async-subgraph-1.mjs Loading commit data...
modules-skip-async-subgraph-2.mjs Loading commit data...
modules-skip-async-subgraph-async.mjs Loading commit data...
modules-skip-async-subgraph-start.mjs Loading commit data...
modules-skip-async-subgraph-x.mjs Loading commit data...
modules-skip-empty.mjs Loading commit data...
modules-skip-export-import-meta.mjs Loading commit data...
modules-skip-imports-json-1.mjs Loading commit data...
modules-skip-large1.mjs Loading commit data...
modules-skip-large2.mjs Loading commit data...
modules-skip-top-level-await-cycle-error-indirection.mjs Loading commit data...
modules-skip-top-level-await-cycle-error-throwing.mjs Loading commit data...
modules-skip-top-level-await-cycle-error.mjs Loading commit data...
modules-top-level-await-cycle-error.mjs Loading commit data...
nullish.js Loading commit data...
numeric-separator.js Loading commit data...
object-fromentries.js Loading commit data...
optional-catch-binding-breaks.js Loading commit data...
optional-catch-binding.js Loading commit data...
optional-chaining-this-private.js Loading commit data...
optional-chaining-this.js Loading commit data...
optional-chaining.js Loading commit data...
private-accessors.js Loading commit data...
private-brand-checks.js Loading commit data...
private-brand-nested-super.js Loading commit data...
private-fields-ic.js Loading commit data...
private-fields-nonextensible-global-proxy-no-lazy-feedback.js Loading commit data...
private-fields-nonextensible-global-proxy.js Loading commit data...
private-fields-special-object.js Loading commit data...
private-fields-static.js Loading commit data...
private-fields.js Loading commit data...
private-methods-empty-inner.js Loading commit data...
private-methods.js Loading commit data...
private-name-scopes.js Loading commit data...
private-name-surrogate-pair.js Loading commit data...
private-reference-logical-assignment-short-circuit.js Loading commit data...
private-symbols.js Loading commit data...
private.js Loading commit data...
promise-all-settled.js Loading commit data...
promise-any-overflow-1.js Loading commit data...
promise-any-overflow-2.js Loading commit data...
promise-any-resolve-not-callable.js Loading commit data...
promise-any.js Loading commit data...
promise-prototype-finally.js Loading commit data...
public-instance-class-fields.js Loading commit data...
public-static-class-fields.js Loading commit data...
regexp-change-exec.js Loading commit data...
regexp-dotall.js Loading commit data...
regexp-match-indices.js Loading commit data...
regexp-named-captures.js Loading commit data...
regexp-overriden-exec.js Loading commit data...
regexp-property-binary.js Loading commit data...
regexp-property-char-class.js Loading commit data...
regexp-property-enumerated.js Loading commit data...
regexp-property-exact-match.js Loading commit data...
regexp-property-general-category.js Loading commit data...
regexp-property-invalid.js Loading commit data...
regexp-property-lu-ui.js Loading commit data...
regexp-property-lu-ui0.js Loading commit data...
regexp-property-lu-ui1.js Loading commit data...
regexp-property-lu-ui2.js Loading commit data...
regexp-property-lu-ui3.js Loading commit data...
regexp-property-lu-ui4.js Loading commit data...
regexp-property-lu-ui5.js Loading commit data...
regexp-property-lu-ui6.js Loading commit data...
regexp-property-lu-ui7.js Loading commit data...
regexp-property-lu-ui8.js Loading commit data...
regexp-property-lu-ui9.js Loading commit data...
regexp-property-script-extensions.js Loading commit data...
regexp-property-scripts.js Loading commit data...
regexp-property-special.js Loading commit data...
regress-generators-resume.js Loading commit data...
relative-indexing-methods.js Loading commit data...
set-prototype-of.js Loading commit data...
shadowrealm-evaluate.js Loading commit data...
shadowrealm-wrapped-function.js Loading commit data...
sharedarraybuffer-stress.js Loading commit data...
sharedarraybuffer-worker-gc-stress.js Loading commit data...
sharedarraybuffer.js Loading commit data...
static-private-methods.js Loading commit data...
string-matchAll-deleted-matchAll.js Loading commit data...
string-matchAll.js Loading commit data...
string-replaceAll.js Loading commit data...
symbol-async-iterator.js Loading commit data...
symbol-description.js Loading commit data...
to-length.js Loading commit data...
to-name.js Loading commit data...
to-number.js Loading commit data...
to-string.js Loading commit data...
trailing-commas-length.js Loading commit data...
typedarray-findlast.js Loading commit data...
typedarray-findlastindex.js Loading commit data...
typedarray-set-length-detach.js Loading commit data...
well-formed-json-stringify-checked.js Loading commit data...
well-formed-json-stringify-unchecked.js Loading commit data...