Ignore:
Timestamp:
Jan 9, 2018, 10:49:25 AM (7 years ago)
Author:
[email protected]
Message:

ASSERTION FAILED: pair.second->m_type & PropertyNode::Getter
https://bugs.webkit.org/show_bug.cgi?id=181388
<rdar://problem/36349351>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-181388.js: Added.

Source/JavaScriptCore:

When there are duplicate setters or getters, we may end up overwriting a getter
with a setter, or vice versa. This patch adds tracking for getters/setters that
have been overwritten with duplicates and ignore them.

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitBytecode):

  • parser/NodeConstructors.h:

(JSC::PropertyNode::PropertyNode):

  • parser/Nodes.h:

(JSC::PropertyNode::isOverriddenByDuplicate const):
(JSC::PropertyNode::setIsOverriddenByDuplicate):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r225799 r226650  
    22 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
    33 *  Copyright (C) 2001 Peter Kelly ([email protected])
    4  *  Copyright (C) 2003-2009, 2013, 2015-2016 Apple Inc. All rights reserved.
     4 *  Copyright (C) 2003-2018 Apple Inc. All rights reserved.
    55 *  Copyright (C) 2007 Cameron Zwarich ([email protected])
    66 *  Copyright (C) 2007 Maks Orlovich
     
    698698        bool needsSuperBinding() const { return m_needsSuperBinding; }
    699699        bool isClassProperty() const { return m_isClassProperty; }
     700        bool isOverriddenByDuplicate() const { return m_isOverriddenByDuplicate; }
     701        void setIsOverriddenByDuplicate() { m_isOverriddenByDuplicate = true; }
    700702        PutType putType() const { return static_cast<PutType>(m_putType); }
    701703
     
    709711        unsigned m_putType : 1;
    710712        unsigned m_isClassProperty: 1;
     713        unsigned m_isOverriddenByDuplicate: 1;
    711714    };
    712715
Note: See TracChangeset for help on using the changeset viewer.