Ignore:
Timestamp:
Aug 20, 2009, 11:04:37 AM (16 years ago)
Author:
[email protected]
Message:

Roll out r47571 and related build fixes as it caused us to leak the world without warning.

File:
1 edited

Legend:

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

    r47571 r47582  
    2828#include "JSGlobalObject.h"
    2929#include "Nodes.h"
    30 #include "ParserArena.h"
    3130#include "SourceProvider.h"
    3231#include <wtf/Forward.h>
     
    127126    {
    128127        RefPtr<ProgramNode> program = parse<ProgramNode>(exec, debugger, source, errLine, errMsg);
     128
    129129        if (!program)
    130130            return 0;
    131131
    132         StatementNode* exprStatement = program->singleStatement();
     132        StatementVector& children = program->children();
     133        if (children.size() != 1)
     134            return 0;
     135
     136        StatementNode* exprStatement = children[0];
    133137        ASSERT(exprStatement);
    134138        ASSERT(exprStatement->isExprStatement());
     
    142146            return 0;
    143147
    144         FunctionBodyNode* body = static_cast<FuncExprNode*>(funcExpr)->body();
     148        RefPtr<FunctionBodyNode> body = static_cast<FuncExprNode*>(funcExpr)->body();
    145149        ASSERT(body);
    146         return body;
     150        return body.release();
    147151    }
    148152
Note: See TracChangeset for help on using the changeset viewer.