Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 1ccf5c2a394cb125b09e9c20549dab38d2b662b1..ec3d94d184a632bd47c9c7194d70e672295fb4aa 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1212,24 +1212,7 @@ bool Compiler::CompileOptimized(Handle<JSFunction> function, |
} |
bool Compiler::CompileDebugCode(Handle<JSFunction> function) { |
- Isolate* isolate = function->GetIsolate(); |
- DCHECK(AllowCompilation::IsAllowed(isolate)); |
- |
- // Start a compilation. |
- Zone zone(isolate->allocator(), ZONE_NAME); |
- ParseInfo parse_info(&zone, handle(function->shared())); |
- CompilationInfo info(&parse_info, Handle<JSFunction>::null()); |
- info.MarkAsDebug(); |
- if (GetUnoptimizedCode(&info).is_null()) { |
- isolate->clear_pending_exception(); |
- return false; |
- } |
- |
- // Check postconditions on success. |
- DCHECK(!isolate->has_pending_exception()); |
- DCHECK(function->shared()->is_compiled()); |
- DCHECK(function->shared()->HasDebugCode()); |
- return true; |
+ return CompileDebugCode(handle(function->shared())); |
} |
bool Compiler::CompileDebugCode(Handle<SharedFunctionInfo> shared) { |