Reviewers: Mads Ager,

Message:
The main reason to postpone initialization the debugger script cache
until loaded scripts are actually requested is that in Chrome the
v8::Debug::Call is used for providing source location information for
unhanded exceptions. Initializing the debugger script cache for this use
might cause performance regressions when running Chrome without really
using the debugger.

Description:
Add a script cache to the debugger

When loaded scripts are requested this cache is filled with all the
script objects in the heap. Hereafter its content is kept in sync with
the active scripts in the heap through the notifications of new scripts
compiled and by using weak handles to get notified when a script is
collected.

Through the tracking of collected scripts the debugger event
OnScriptCollected have been added to notify a debugger that a script
previously returned through the scripts command is no longer in use.

Make the ComputeIntegerHash globally available.

Moved clearing of the mirror cache to when debugger is really left.
Previously recursive invocations of the debugger cause the mirror cache
to be cleared causing handles to become either stale or reference other
objects.

Please review this at http://codereview.chromium.org/115462

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     include/v8-debug.h
   M     src/debug-delay.js
   M     src/debug.h
   M     src/debug.cc
   M     src/heap.cc
   M     src/objects-debug.cc
   M     src/objects.cc
   M     src/runtime.cc
   M     src/utils.h
   M     src/utils.cc
   M     test/cctest/test-debug.cc
   M     test/mjsunit/debug-references.js



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to