diff --git a/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash-expected.txt b/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash-expected.txt new file mode 100644 index 0000000000000..eb3bffc3bbeb9 --- /dev/null +++ b/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash-expected.txt @@ -0,0 +1,9 @@ +No crash when property 'x' is assigned + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash.html b/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash.html new file mode 100644 index 0000000000000..b4b996d81be21 --- /dev/null +++ b/LayoutTests/fast/dom/non-reified-event-isTrusted-ic-crash.html @@ -0,0 +1,94 @@ + + + + + diff --git a/Source/JavaScriptCore/bytecode/PropertyCondition.cpp b/Source/JavaScriptCore/bytecode/PropertyCondition.cpp index 028a54299f323..c8fba85099ae1 100644 --- a/Source/JavaScriptCore/bytecode/PropertyCondition.cpp +++ b/Source/JavaScriptCore/bytecode/PropertyCondition.cpp @@ -205,6 +205,14 @@ bool PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint( if (PropertyConditionInternal::verbose) dataLog("Invalid because its put() override may treat ", uid(), " property as read-only.\n"); return false; + } else if (structure->hasNonReifiedStaticProperties()) { + if (auto entry = structure->findPropertyHashEntry(uid())) { + if (entry->value->attributes() & (PropertyAttribute::ReadOnlyOrAccessorOrCustomAccessor | PropertyAttribute::CustomValue)) { + if (PropertyConditionInternal::verbose) + dataLog("Invalid because we expected not to have a setter, but we have one in non-reified static property table: ", uid(), ".\n"); + return false; + } + } } if (structure->hasPolyProto()) {