diff --git a/src/objects.cc b/src/objects.cc index 5da24af979..9d20f6c503 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -7380,7 +7380,6 @@ void JSFunction::MarkForLazyRecompilation() { ASSERT(is_compiled() && !IsOptimized()); ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); - ASSERT(!shared()->optimization_disabled()); Builtins* builtins = GetIsolate()->builtins(); ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); } diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc index bb7a7d7c64..de9bf401ba 100644 --- a/src/runtime-profiler.cc +++ b/src/runtime-profiler.cc @@ -268,6 +268,7 @@ void RuntimeProfiler::OptimizeNow() { // Do not record non-optimizable functions. if (!function->IsOptimizable()) continue; + if (function->shared()->optimization_disabled()) continue; // Only record top-level code on top of the execution stack and // avoid optimizing excessively large scripts since top-level code