Ignore:
Timestamp:
Mar 20, 2015, 11:10:17 AM (10 years ago)
Author:
[email protected]
Message:

SyntaxChecker assertion is trapped with computed property name and getter
https://bugs.webkit.org/show_bug.cgi?id=142863

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-03-20
Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::getName):
Remove invalid assert. Computed properties will not have a name
and the calling code is checking for null expecting it. The
AST path (non-CheckingPath) already does this without the assert
so it is well tested.

LayoutTests:

  • js/basic-computed-property-name-expected.txt:
  • js/script-tests/basic-computed-property-name.js:

(a.string_appeared_here.runTest):
Add tests that wrap the expression in a function, this
will test the syntax checker.

File:
1 edited

Legend:

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

    r181293 r181807  
    275275    void assignmentStackAppend(int, int, int, int, int, Operator) { }
    276276    int createAssignment(const JSTokenLocation&, int, int, int, int, int) { RELEASE_ASSERT_NOT_REACHED(); return AssignmentExpr; }
    277     const Identifier* getName(const Property& property) const { ASSERT(property.name); return property.name; }
     277    const Identifier* getName(const Property& property) const { return property.name; }
    278278    PropertyNode::Type getType(const Property& property) const { return property.type; }
    279279    bool isResolve(ExpressionType expr) const { return expr == ResolveExpr || expr == ResolveEvalExpr; }
Note: See TracChangeset for help on using the changeset viewer.