Commit 9378b1af authored by olehougaard's avatar olehougaard

Checking and reporting for stack overflow in the right places.

Review URL: http://codereview.chromium.org/12986

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ed4e792c
......@@ -74,11 +74,6 @@ static Handle<Code> MakeCode(FunctionLiteral* literal,
// Generate code and return it.
Handle<Code> result = CodeGenerator::MakeCode(literal, script, is_eval);
// Check for stack-overflow exception.
if (result.is_null()) {
Top::StackOverflow();
Top::ReportPendingMessages();
}
return result;
}
......@@ -123,6 +118,8 @@ static Handle<JSFunction> MakeFunction(bool is_global,
// Check for stack-overflow exceptions.
if (code.is_null()) {
Top::StackOverflow();
Top::ReportPendingMessages();
return Handle<JSFunction>::null();
}
......@@ -211,8 +208,6 @@ Handle<JSFunction> Compiler::Compile(Handle<String> source,
}
}
if (result.is_null()) Top::ReportPendingMessages();
return result;
}
......@@ -243,8 +238,6 @@ Handle<JSFunction> Compiler::CompileEval(Handle<String> source,
}
}
if (result.is_null()) Top::ReportPendingMessages();
return result;
}
......@@ -294,7 +287,10 @@ bool Compiler::CompileLazy(Handle<SharedFunctionInfo> shared,
// Compile the code.
Handle<Code> code = MakeCode(lit, script, false);
// Check for stack-overflow exception.
if (code.is_null()) {
Top::StackOverflow();
Top::ReportPendingMessages();
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment