Revision: 24971
Author:   [email protected]
Date:     Wed Oct 29 10:28:11 2014 UTC
Log:      Eager compile for debugging when debug is active.

Scenario:
On reload, Devtools restores previously set break points. At this point,
since Devtools is already opened, all code is compiled with debug break
slots. No break points exist yet, so we would lazily compile inner
functions, even ones that cannot be compiled lazily without a context.
So when we use Debug::FindSharedFunctionInfoInScript to find the break
positions, those lazily compiled functions are skipped.

By eagerly compiling when debug is active, we make sure that whenever
Devtools is open, functions that cannot be compiled lazily without a
context are always compiled with its outer function.

[email protected]
BUG=chromium:424142
LOG=N

Review URL: https://codereview.chromium.org/683413003
https://code.google.com/p/v8/source/detail?r=24971

Modified:
 /branches/bleeding_edge/src/compiler.cc

=======================================
--- /branches/bleeding_edge/src/compiler.cc     Tue Oct 28 13:23:54 2014 UTC
+++ /branches/bleeding_edge/src/compiler.cc     Wed Oct 29 10:28:11 2014 UTC
@@ -1437,8 +1437,10 @@

 bool Compiler::DebuggerWantsEagerCompilation(CompilationInfo* info,
                                              bool allow_lazy_without_ctx) {
-  return LiveEditFunctionTracker::IsActive(info->isolate()) ||
- (info->isolate()->DebuggerHasBreakPoints() && !allow_lazy_without_ctx);
+  if (LiveEditFunctionTracker::IsActive(info->isolate())) return true;
+  Debug* debug = info->isolate()->debug();
+  bool debugging = debug->is_active() || debug->has_break_points();
+  return debugging && !allow_lazy_without_ctx;
 }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to