Ignore:
Timestamp:
Jan 19, 2011, 12:18:57 PM (15 years ago)
Author:
[email protected]
Message:

2011-01-19 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

[jsfunfuzz] Defining a function called proto inside an eval triggers an assertion
https://bugs.webkit.org/show_bug.cgi?id=52672

Add tests to ensure that we disallow proto as a function name.

  • fast/js/parser-syntax-check-expected.txt:
  • fast/js/script-tests/parser-syntax-check.js:

2011-01-19 Oliver Hunt <[email protected]>

Reviewed by Gavin Barraclough.

[jsfunfuzz] Defining a function called proto inside an eval triggers an assertion
https://bugs.webkit.org/show_bug.cgi?id=52672

Rather than coming up with a somewhat convoluted mechanism to ensure that
developers can override the global objects prototype with a function named
proto and expect it to work, we just disallow it at the syntax level.

  • parser/JSParser.cpp: (JSC::JSParser::parseFunctionInfo):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r76133 r76148  
     12011-01-19  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
     6        https://bugs.webkit.org/show_bug.cgi?id=52672
     7
     8        Rather than coming up with a somewhat convoluted mechanism to ensure that
     9        developers can override the global objects prototype with a function named
     10        __proto__ and expect it to work, we just disallow it at the syntax level.
     11
     12        * parser/JSParser.cpp:
     13        (JSC::JSParser::parseFunctionInfo):
     14
    1152011-01-19  Michael Saboff  <[email protected]>
    216
Note: See TracChangeset for help on using the changeset viewer.