Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index 3db32ce0e328295032a7ab2372cb2fba989775cc..4fc1635a1746cdc9b8aeb2f62b04e3939575ae10 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -330,12 +330,15 @@ class CompilationInfo { |
} |
void AbortOptimization(BailoutReason reason) { |
- if (bailout_reason_ != kNoReason) bailout_reason_ = reason; |
+ DCHECK(reason != kNoReason); |
+ if (bailout_reason_ == kNoReason) bailout_reason_ = reason; |
SetFlag(kDisableFutureOptimization); |
} |
void RetryOptimization(BailoutReason reason) { |
- if (bailout_reason_ != kNoReason) bailout_reason_ = reason; |
+ DCHECK(reason != kNoReason); |
+ if (GetFlag(kDisableFutureOptimization)) return; |
+ bailout_reason_ = reason; |
} |
BailoutReason bailout_reason() const { return bailout_reason_; } |