Changeset 47582 in webkit for trunk/JavaScriptCore/parser/Parser.h
- Timestamp:
- Aug 20, 2009, 11:04:37 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/parser/Parser.h
r47571 r47582 28 28 #include "JSGlobalObject.h" 29 29 #include "Nodes.h" 30 #include "ParserArena.h"31 30 #include "SourceProvider.h" 32 31 #include <wtf/Forward.h> … … 127 126 { 128 127 RefPtr<ProgramNode> program = parse<ProgramNode>(exec, debugger, source, errLine, errMsg); 128 129 129 if (!program) 130 130 return 0; 131 131 132 StatementNode* exprStatement = program->singleStatement(); 132 StatementVector& children = program->children(); 133 if (children.size() != 1) 134 return 0; 135 136 StatementNode* exprStatement = children[0]; 133 137 ASSERT(exprStatement); 134 138 ASSERT(exprStatement->isExprStatement()); … … 142 146 return 0; 143 147 144 FunctionBodyNode*body = static_cast<FuncExprNode*>(funcExpr)->body();148 RefPtr<FunctionBodyNode> body = static_cast<FuncExprNode*>(funcExpr)->body(); 145 149 ASSERT(body); 146 return body ;150 return body.release(); 147 151 } 148 152
Note:
See TracChangeset
for help on using the changeset viewer.