Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: src/compiler.cc

Issue 6487021: Properly treat exceptions thrown while compiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing Kevin's comments + disabling the regression test for ARM Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 77111a842e7d55e6aa4a7ea8dfa02635ee431f3c..54f52fc77ba8ad104f0cfd5d9d281dc31f2e4cf8 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -289,6 +289,11 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
HGraphBuilder builder(&oracle);
HPhase phase(HPhase::kTotal);
HGraph* graph = builder.CreateGraph(info);
+ if (Top::has_pending_exception()) {
+ info->SetCode(Handle<Code>::null());
+ return false;
+ }
+
if (graph != NULL && FLAG_build_lithium) {
Handle<Code> code = graph->Compile();
if (!code.is_null()) {
@@ -608,7 +613,9 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
// Compile the code.
if (!MakeCode(info)) {
- Top::StackOverflow();
+ if (!Top::has_pending_exception()) {
+ Top::StackOverflow();
+ }
} else {
ASSERT(!info->code().is_null());
Handle<Code> code = info->code();
« no previous file with comments | « no previous file | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698