Ignore:
Timestamp:
Oct 14, 2015, 12:08:54 AM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r191030.
https://bugs.webkit.org/show_bug.cgi?id=150116

caused js/class-syntax-method-names.html to crash on debug
builds (Requested by alexchristensen_ on #webkit).

Reverted changeset:

"[ES6] Class expression should have lexical environment that
has itself as an imutable binding"
https://bugs.webkit.org/show_bug.cgi?id=150089
http://trac.webkit.org/changeset/191030

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r191030 r191037  
    19241924
    19251925    AutoPopScopeRef classScope(this, pushScope());
    1926     classScope->setIsLexicalScope();
    1927     classScope->preventVarDeclarations();
    19281926    classScope->setStrictMode();
    19291927
     
    19331931        info.className = className;
    19341932        next();
    1935         failIfTrue(classScope->declareLexicalVariable(className, true) & DeclarationResult::InvalidStrictMode, "'", className->impl(), "' is not a valid class name");
     1933        failIfTrue(classScope->declareVariable(className) & DeclarationResult::InvalidStrictMode, "'", className->impl(), "' is not a valid class name");
    19361934    } else if (requirements == FunctionNeedsName) {
    19371935        if (match(OPENBRACE))
     
    20502048    }
    20512049
     2050    popScope(classScope, TreeBuilder::NeedsFreeVariableInfo);
    20522051    consumeOrFail(CLOSEBRACE, "Expected a closing '}' after a class body");
    20532052
    2054     auto classExpression = context.createClassExpr(location, *className, classScope->finalizeLexicalEnvironment(), constructor, parentClass, instanceMethods, staticMethods);
    2055     popScope(classScope, TreeBuilder::NeedsFreeVariableInfo);
    2056     return classExpression;
     2053    return context.createClassExpr(location, *className, constructor, parentClass, instanceMethods, staticMethods);
    20572054}
    20582055#endif
Note: See TracChangeset for help on using the changeset viewer.