From: christian.plesner.hansen@gmail.com Date: Thu, 13 Aug 2009 10:25:35 +0000 (+0000) Subject: Fixed issue 19212 X-Git-Tag: upstream/4.7.83~23471 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=061834200afbaacdf235e0a8210b597eba7fbb97;p=platform%2Fupstream%2Fv8.git Fixed issue 19212 Fixed a bug in json parsing. Refactored compilation code a bit to make it more obvious what's going on. Review URL: http://codereview.chromium.org/165446 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/compiler.cc b/src/compiler.cc index f0d97fe..5607f29 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -102,7 +102,7 @@ static Handle MakeCode(FunctionLiteral* literal, static bool IsValidJSON(FunctionLiteral* lit) { - if (!lit->body()->length() == 1) + if (lit->body()->length() != 1) return false; Statement* stmt = lit->body()->at(0); if (stmt->AsExpressionStatement() == NULL) @@ -114,7 +114,7 @@ static bool IsValidJSON(FunctionLiteral* lit) { static Handle MakeFunction(bool is_global, bool is_eval, - bool is_json, + Compiler::ValidationState validate, Handle