Ignore:
Timestamp:
May 8, 2009, 6:01:16 PM (16 years ago)
Author:
[email protected]
Message:

Add a limited literal parser for eval to handle object and array literals fired at eval

Reviewed by Gavin Barraclough and Darin Adler.

This is a simplified parser and lexer that we can throw at strings passed to eval
in case a site is using eval to parse JSON (eg. json2.js). The lexer is intentionally
limited (in effect it's whitelisting a limited "common" subset of the JSON grammar)
as this decreases the likelihood of us wating time attempting to parse any significant
amount of non-JSON content.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj

    r43311 r43424  
    601601                        <File
    602602                                RelativePath="..\..\bytecompiler\LabelScope.h"
     603                                >
     604                        </File>
     605                        <File
     606                                RelativePath="..\..\runtime\LiteralParser.cpp"
     607                                >
     608                        </File>
     609                        <File
     610                                RelativePath="..\..\runtime\LiteralParser.h"
    603611                                >
    604612                        </File>
Note: See TracChangeset for help on using the changeset viewer.