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

Unified Diff: src/runtime.cc

Issue 7839030: Support for precise stepping in functions compiled before debugging was started (step 1) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed #if 0 / #endif Created 9 years, 3 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/objects-inl.h ('k') | test/mjsunit/debug-step-2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 857339db66d947282e58d237c15ab07982620f91..b4abe88cbf910f6f997d63386b08c5d449b58a59 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8108,6 +8108,15 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
Handle<JSFunction> function = args.at<JSFunction>(0);
+
+ // If the function is not compiled ignore the lazy
+ // recompilation. This can happen if the debugger is activated and
+ // the function is returned to the not compiled state.
+ if (!function->shared()->is_compiled()) {
+ function->ReplaceCode(function->shared()->code());
+ return function->code();
+ }
+
// If the function is not optimizable or debugger is active continue using the
// code from the full compiler.
if (!function->shared()->code()->optimizable() ||
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/debug-step-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698