Ignore:
Timestamp:
Jun 13, 2017, 2:52:04 PM (8 years ago)
Author:
[email protected]
Message:

DFG doesn't properly handle a property that is change to read only in a prototype
https://bugs.webkit.org/show_bug.cgi?id=173321

Reviewed by Filip Pizlo.

JSTests:

  • ChakraCore.yaml: Renabled fieldopts/objtypespec-newobj-invalidation.1.js.
  • stress/regress-173321.js: Added new regression test.

(shouldBe):
(SimpleObject):
(test):

Source/JavaScriptCore:

We need to check for ReadOnly as well as a not being a Setter when checking
an AbsenceOfSetter.

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint):

File:
1 edited

Legend:

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

    r211247 r218203  
    135135        PropertyOffset currentOffset = structure->getConcurrently(uid(), currentAttributes);
    136136        if (currentOffset != invalidOffset) {
    137             if (currentAttributes & (Accessor | CustomAccessor)) {
     137            // FIXME: Given the addition of the check for ReadOnly attributes, we should refactor
     138            // instances of AbsenceOfSetter.
     139            // https://bugs.webkit.org/show_bug.cgi?id=173322 - Refactor AbsenceOfSetter to something like AbsenceOfSetEffects
     140            if (currentAttributes & (ReadOnly | Accessor | CustomAccessor)) {
    138141                if (verbose) {
    139142                    dataLog(
Note: See TracChangeset for help on using the changeset viewer.