Ignore:
Timestamp:
Dec 20, 2010, 5:02:31 PM (14 years ago)
Author:
[email protected]
Message:

2010-12-20 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

|delete name| in strict mode code should be an early error
https://bugs.webkit.org/show_bug.cgi?id=50431

Disallow the |delete IDENTIFIER| production in strict mode, and removed
a bunch of now unnecessary code.

  • parser/JSParser.cpp: (JSC::JSParser::Scope::collectFreeVariables): (JSC::jsParse): (JSC::JSParser::parseProgram): (JSC::JSParser::parseUnaryExpression):
  • parser/JSParser.h:
  • parser/Parser.cpp: (JSC::Parser::parse):
  • parser/Parser.h: (JSC::Parser::parse):

2010-12-20 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

|delete name| in strict mode code should be an early error
https://bugs.webkit.org/show_bug.cgi?id=50431

Add a test to ensure that |delete IDENTIFIER| is disallowed, even if
IDENTIFIER resolves to a deletable property.

  • fast/js/basic-strict-mode-expected.txt:
  • fast/js/script-tests/basic-strict-mode.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/JSParser.h

    r69516 r74377  
    3232class FunctionParameters;
    3333class Identifier;
    34 class JSGlobalObject;
     34class JSGlobalData;
    3535class SourceCode;
    3636
     
    160160enum JSParserMode { JSParseProgramCode, JSParseFunctionCode };
    161161
    162 int jsParse(JSGlobalObject*, FunctionParameters*, JSParserStrictness, JSParserMode, const SourceCode*);
     162int jsParse(JSGlobalData*, FunctionParameters*, JSParserStrictness, JSParserMode, const SourceCode*);
    163163}
    164164#endif // JSParser_h
Note: See TracChangeset for help on using the changeset viewer.