| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index a8cf14c620079bdd7a202972aad68873a5d56311..b13111962c48e74f4b0dd88639970bcad752282d 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -640,8 +640,10 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
|
| }
|
|
|
| // Reset profiler ticks, function is no longer considered hot.
|
| - if (shared->is_compiled()) {
|
| + if (shared->HasBaselineCode()) {
|
| shared->code()->set_profiler_ticks(0);
|
| + } else if (shared->HasBytecodeArray()) {
|
| + shared->set_profiler_ticks(0);
|
| }
|
|
|
| VMState<COMPILER> state(isolate);
|
| @@ -734,7 +736,13 @@ CompilationJob::Status FinalizeOptimizedCompilationJob(CompilationJob* job) {
|
| "V8.RecompileSynchronous");
|
|
|
| Handle<SharedFunctionInfo> shared = info->shared_info();
|
| - shared->code()->set_profiler_ticks(0);
|
| +
|
| + // Reset profiler ticks, function is no longer considered hot.
|
| + if (shared->HasBaselineCode()) {
|
| + shared->code()->set_profiler_ticks(0);
|
| + } else if (shared->HasBytecodeArray()) {
|
| + shared->set_profiler_ticks(0);
|
| + }
|
|
|
| DCHECK(!shared->HasDebugInfo());
|
|
|
|
|