Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: src/debug.cc

Issue 1258503003: Debugger: correctly recompile toplevel eval functions for debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add comment Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 4d6ee180efb9a78c288eac1af76d214c71fdf1dd..172ad3e751fd6c8bf5ef1be89481a07d06c4cce3 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -1457,9 +1457,7 @@ bool Debug::PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared) {
if (!shared->HasDebugCode()) {
DCHECK(functions.length() > 0);
- if (Compiler::GetDebugCode(functions.first()).is_null()) {
- return false;
- }
+ if (!Compiler::CompileDebugCode(functions.first())) return false;
}
for (Handle<JSFunction> const function : functions) {
@@ -1560,7 +1558,7 @@ Handle<Object> Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
// If not, compile to reveal inner functions, if possible.
if (shared->allows_lazy_compilation_without_context()) {
HandleScope scope(isolate_);
- if (Compiler::GetDebugCode(handle(shared)).is_null()) break;
+ if (!Compiler::CompileDebugCode(handle(shared))) break;
continue;
}
@@ -1590,9 +1588,9 @@ Handle<Object> Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
}
HandleScope scope(isolate_);
if (closure == NULL) {
- if (Compiler::GetDebugCode(handle(shared)).is_null()) break;
+ if (!Compiler::CompileDebugCode(handle(shared))) break;
} else {
- if (Compiler::GetDebugCode(handle(closure)).is_null()) break;
+ if (!Compiler::CompileDebugCode(handle(closure))) break;
}
}
return isolate_->factory()->undefined_value();
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698