| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 8fac53e970322fee813cdfbd3e05cb07ef7a6239..7e658c34cb7598fba57f3c087b6a0bc0fbc9e575 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -143,7 +143,9 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info,
|
| debug_name_(debug_name) {}
|
|
|
| CompilationInfo::~CompilationInfo() {
|
| - DisableFutureOptimization();
|
| + if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
|
| + shared_info()->DisableOptimization(bailout_reason());
|
| + }
|
| dependencies()->Rollback();
|
| delete deferred_handles_;
|
| }
|
| @@ -627,9 +629,9 @@ bool Renumber(ParseInfo* parse_info) {
|
| if (lit->dont_optimize_reason() != kNoReason) {
|
| shared_info->DisableOptimization(lit->dont_optimize_reason());
|
| }
|
| - shared_info->set_dont_crankshaft(
|
| - shared_info->dont_crankshaft() ||
|
| - (lit->flags() & AstProperties::kDontCrankshaft));
|
| + if (lit->flags() & AstProperties::kDontCrankshaft) {
|
| + shared_info->set_dont_crankshaft(true);
|
| + }
|
| }
|
| return true;
|
| }
|
|
|