Ignore:
Timestamp:
Jun 22, 2018, 5:45:06 PM (7 years ago)
Author:
[email protected]
Message:

PropertyCondition::isValidValueForAttributes() should also consider deleted values.
https://bugs.webkit.org/show_bug.cgi?id=186943
<rdar://problem/41370337>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-186943.js: Added.

Source/JavaScriptCore:

PropertyCondition::isValidValueForAttributes() should check if the passed in value
is a deleted one before it does a jsDynamicCast on it.

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isValidValueForAttributes):

  • runtime/JSCJSValueInlines.h:
  • removed an unnecessary #if.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp

    r232337 r233114  
    378378bool PropertyCondition::isValidValueForAttributes(VM& vm, JSValue value, unsigned attributes)
    379379{
     380    if (!value)
     381        return false;
    380382    bool attributesClaimAccessor = !!(attributes & PropertyAttribute::Accessor);
    381383    bool valueClaimsAccessor = !!jsDynamicCast<GetterSetter*>(vm, value);
Note: See TracChangeset for help on using the changeset viewer.