diff options
Diffstat (limited to 'deps/v8/src/runtime-profiler.cc')
-rw-r--r-- | deps/v8/src/runtime-profiler.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deps/v8/src/runtime-profiler.cc b/deps/v8/src/runtime-profiler.cc index c53ddd2b97..1efc6ef620 100644 --- a/deps/v8/src/runtime-profiler.cc +++ b/deps/v8/src/runtime-profiler.cc @@ -165,8 +165,10 @@ static void AttemptOnStackReplacement(JSFunction* function) { } SharedFunctionInfo* shared = function->shared(); - // If the code is not optimizable, don't try OSR. - if (!shared->code()->optimizable()) return; + // If the code is not optimizable or references context slots, don't try OSR. + if (!shared->code()->optimizable() || !shared->allows_lazy_compilation()) { + return; + } // We are not prepared to do OSR for a function that already has an // allocated arguments object. The optimized code would bypass it for |