Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 067d46be1a1baf3073b7d0ae5d4d420c8254a6c4..9730f576297ddd2eaf3e944e0b3dbd4a189e621f 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -863,9 +863,12 @@ bool Compiler::ParseAndAnalyze(ParseInfo* info) { |
static bool GetOptimizedCodeNow(CompilationInfo* info) { |
+ Isolate* isolate = info->isolate(); |
+ CanonicalHandleScope canonical(isolate); |
+ |
if (!Compiler::ParseAndAnalyze(info->parse_info())) return false; |
- TimerEventScope<TimerEventRecompileSynchronous> timer(info->isolate()); |
+ TimerEventScope<TimerEventRecompileSynchronous> timer(isolate); |
OptimizedCompileJob job(info); |
if (job.CreateGraph() != OptimizedCompileJob::SUCCEEDED || |
@@ -880,7 +883,7 @@ static bool GetOptimizedCodeNow(CompilationInfo* info) { |
} |
// Success! |
- DCHECK(!info->isolate()->has_pending_exception()); |
+ DCHECK(!isolate->has_pending_exception()); |
InsertCodeIntoOptimizedCodeMap(info); |
RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, |
info->shared_info()); |
@@ -890,6 +893,8 @@ static bool GetOptimizedCodeNow(CompilationInfo* info) { |
static bool GetOptimizedCodeLater(CompilationInfo* info) { |
Isolate* isolate = info->isolate(); |
+ CanonicalHandleScope canonical(isolate); |
+ |
if (!isolate->optimizing_compile_dispatcher()->IsQueueAvailable()) { |
if (FLAG_trace_concurrent_recompilation) { |
PrintF(" ** Compilation queue full, will retry optimizing "); |