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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2341523002: VM: Better handling of OOM errors in the background compiler (Closed)
Patch Set: lint Created 4 years, 3 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 | « runtime/vm/exceptions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 113c3e9eb5577adb14c91c7ee64ae345b69dbf1f..b42bba53d3ccab8bd7dc7569574db7ba23ee2b94 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -961,9 +961,9 @@ class CallSiteInliner : public ValueObject {
} else {
error = thread()->sticky_error();
thread()->clear_sticky_error();
- ASSERT(error.IsLanguageError());
- if (LanguageError::Cast(error).kind() == Report::kBailout) {
+ if (error.IsLanguageError() &&
+ (LanguageError::Cast(error).kind() == Report::kBailout)) {
if (error.raw() == Object::background_compilation_error().raw()) {
// Fall through to exit the compilation, and retry it later.
} else {
@@ -976,18 +976,20 @@ class CallSiteInliner : public ValueObject {
}
} else {
// Fall through to exit long jump scope.
- ASSERT(FLAG_precompiled_mode);
}
}
}
// Propagate a compile-time error. In precompilation we attempt to
// inline functions that have never been compiled before; when JITing we
- // should only see compile-time errors in unoptimized compilation.
+ // should only see language errors in unoptimized compilation.
+ // Otherwise, there can be an out-of-memory error (unhandled exception).
// In background compilation we may abort compilation as the state
// changes while compiling. Propagate that 'error' and retry compilation
// later.
- ASSERT(FLAG_precompiled_mode || Compiler::IsBackgroundCompilation());
+ ASSERT(FLAG_precompiled_mode ||
+ Compiler::IsBackgroundCompilation() ||
+ error.IsUnhandledException());
Thread::Current()->long_jump_base()->Jump(1, error);
UNREACHABLE();
return false;
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698