Skip to content

Commit

Permalink
Check that the Accessor attribute is set in JSObject::getOwnNonIndexP…
Browse files Browse the repository at this point in the history
…ropertySlot

https://bugs.webkit.org/show_bug.cgi?id=273576
rdar://127365044

Reviewed by Yusuke Suzuki.

We can't put in RELEASE_ASSERTs here since that would cause a nontrivial
perf hit on certain platforms, but we can at least put in debug asserts
to help with debugging.

* Source/JavaScriptCore/runtime/JSObject.h:
(JSC::JSObject::getOwnNonIndexPropertySlot):

Canonical link: https://commits.webkit.org/278518@main
  • Loading branch information
Achierius authored and ddegazio committed May 8, 2024
1 parent 5b9a246 commit 108a035
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/JavaScriptCore/runtime/JSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -1514,9 +1514,11 @@ ALWAYS_INLINE bool JSObject::getOwnNonIndexPropertySlot(VM& vm, Structure* struc
JSType type = cell->type();
switch (type) {
case GetterSetterType:
ASSERT(attributes & PropertyAttribute::Accessor);
fillGetterPropertySlot(vm, slot, cell, attributes, offset);
return true;
case CustomGetterSetterType:
ASSERT(attributes & PropertyAttribute::CustomAccessorOrValue);
fillCustomGetterPropertySlot(slot, jsCast<CustomGetterSetter*>(cell), attributes, structure);
return true;
default:
Expand Down

0 comments on commit 108a035

Please sign in to comment.