Commit Graph

81 Commits

Author SHA1 Message Date
yurys@chromium.org
20e4b1dbc5 Reapply http://codereview.chromium.org/149542 now that issue with Mac builder is fixed(http://codereview.chromium.org/155591)
Review URL: http://codereview.chromium.org/149746

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-16 07:07:51 +00:00
yurys@chromium.org
12d5143551 Reverting 2458 to see if it makes Builder Webkit Mac (V8-Latest) happy.
Review URL: http://codereview.chromium.org/149672

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-15 09:45:06 +00:00
yurys@chromium.org
cc6be014dc Support stepping into getters and setters.
Related Chromium bug:
http://code.google.com/p/chromium/issues/detail?id=16427

Review URL: http://codereview.chromium.org/149542

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2458 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-14 16:55:32 +00:00
yurys@chromium.org
0da86e1250 Fix an issue with debugger 'step in' when calling function has local variables.Corresponding Chromium bug:http://code.google.com/p/chromium/issues/detail?id=15824
Review URL: http://codereview.chromium.org/149326

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-10 09:57:53 +00:00
ager@chromium.org
f706cfa30c Fix debugger after inlined keyed store change.
Make sure that the IC is always hit when debugging and make sure to
restore the fast case when leaving the debugger.
Review URL: http://codereview.chromium.org/125044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-12 11:24:13 +00:00
sgjesse@chromium.org
d498361c5f Add more debugging information to scripts compiled through eval.
Scripts now have a compilation type which can be host, eval or JSON. Host scripts are compiled through the API, eval scripts are compiled through call to evan and JSON scripts are compiled as a result of calling JSON.parse.

For scripts scripts compiled through eval the JavaScript function in top of the stack and the pc offset into the code is stored in the script object. This makes it possible to calculate the source position of the eval call later when requested. This information can be obtained through the script mirror object and is part of the script mirror JSON serialization for the debugger protocol.

Moved the enumeration ScripType into class Script and remamed to Type. The new compilation type enumeration is also inside the class Script.

This information is now shown when using the scripts command in he developer shell debugger.
Review URL: http://codereview.chromium.org/119108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2119 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-08 10:47:49 +00:00
ager@chromium.org
ce988f32cc Add a couple of parenthesis to improve readability and please certain
GCC version.

BUG=364
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/118016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 19:17:48 +00:00
sgjesse@chromium.org
a019501be2 Change the handling of the debug break stack guard. The debug break is no longer ignored when hit inside "system" JavaScript. The reason for this is twofold:
* Running "system" JavaScript with the debug break flag active leads to slow running code while waiting for the break in non "system" JavaScript (one exception to this it is to try to avoid breaks in the clear mirror cache JavaScript code called when leaving the debugger).

* If this happens while processing RegExp running in native code an infinite loop is created as the stack guard handler for RegExp does not move execution forward

Fixed a GC bug in the interrupt handling for RegExp running in native code.

Added test of debug break while in debug message handler callback and debug break while executing a RegExp.
Review URL: http://codereview.chromium.org/115262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-29 08:42:02 +00:00
sgjesse@chromium.org
4014f6428d Don't process debug requests if the debug event is script collected.
Review URL: http://codereview.chromium.org/113900

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-27 20:57:01 +00:00
mikhail.naganov@gmail.com
30a0a7de43 Split nested namespaces declaration in two lines in accordance with C++ Style Guide.
This issue was raised by Brett Wilson while reviewing my changelist for readability. Craig Silverstein (one of C++ SG maintainers) confirmed that we should declare one namespace per line. Our way of namespaces closing seems not violating style guides (there is no clear agreement on it), so I left it intact.

Review URL: http://codereview.chromium.org/115756


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 10:05:56 +00:00
yurys@chromium.org
530b86ff17 When message handler is set to NULL and there is no debugger listener the debugger is unloaded immediately unless it's entered, in which case it will be unloaded when last instance of EnterDebugger is destroyed.
Without the change the debugger may crash as Debugger::EventActive(v8::Break) called from OnDebugBreak may clear current debugger context. 

Also when compilation cache was enabled debugger could fail on second attach for the same reason(see AfterCompileMessageWhenMessageHandlerIsReset).

BUG=12404
Review URL: http://codereview.chromium.org/115709

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 07:51:04 +00:00
yurys@chromium.org
d6742c7fae For ScriptCollected events current context may be null. Message.GetEventContext will return an empty handle in such cases.
Review URL: http://codereview.chromium.org/113698

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-21 14:21:14 +00:00
sgjesse@chromium.org
7a10634e90 Disable compilation cache when debugger is active.
Added an option to control whether the compilation cache is enabled. Default value is true.

BUG=343
Review URL: http://codereview.chromium.org/113625

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 20:28:33 +00:00
yurys@chromium.org
897ecefe1e Exposed method for finding global context by traversing context chain to API.
Review URL: http://codereview.chromium.org/112035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-20 07:28:42 +00:00
sgjesse@chromium.org
94879a93b0 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.
Review URL: http://codereview.chromium.org/115462

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-18 13:14:37 +00:00
sgjesse@chromium.org
3cdb194c56 Add the ability to set embedder data on created contexts from the API.
Expose the active context where a break event occoured through the debug message handler.
Review URL: http://codereview.chromium.org/109013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-05 09:38:45 +00:00
sgjesse@chromium.org
2beedf1181 Create a transition API for the debug message handler.
Kept the previous message handler API to avoid breaking clients depending on it.

The new message handler API uses a new name ending with 2.
Review URL: http://codereview.chromium.org/100158

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 12:54:07 +00:00
sgjesse@chromium.org
f8319c3cba Re-submit http://codereview.chromium.org/99122 after fixing compilation issues.
TBR=yurys@chromium.org
Review URL: http://codereview.chromium.org/100155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 09:04:20 +00:00
sgjesse@chromium.org
974734bedb Reverting 1811.
Review URL: http://codereview.chromium.org/99175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:33:01 +00:00
sgjesse@chromium.org
95288e916e Changed the debugger message API to receive an object instead of a JSON string.
The object delivered to the debug message handler contains additional information on the current break handling the messages.

Clients which require just JSON message parsing can simply get the JSON using the GetJSON message on the message object to still have the previous behaviour.

  NewMessageHangler(const v8::Debug::Message& message) {
    v8::String::Value val(message.GetJSON());
    OldMessageHandler(Vector<uint16_t>(const_cast<uint16_t*>(*val), val.length()));
  }

Refactored some of the debugger code to use internal handles instead of API handles. Also changed Object to JSObject is some places.

The access to the active context when the break occurred is still not implemented. I will add this in a new CL, as this one is quite big already.
Review URL: http://codereview.chromium.org/99122

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-29 08:23:58 +00:00
kmillikin@chromium.org
d30bc90b9c Inline the inobject property case for named property loads.
Review URL: http://codereview.chromium.org/99120

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-28 10:40:36 +00:00
yurys@chromium.org
c56b22c72a 1. Send 'afterCompile' event to the debug message handler.2. Process messages from the debugger command queue on each event not only break and exception.3. auto_continue is always true for compilation events.
Review URL: http://codereview.chromium.org/100034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-27 12:38:20 +00:00
sgjesse@chromium.org
8fefc769f5 Removed the debug message thread.
The debug message thread was introduced to make it possible to have the message handler callback be called from a different thread than the thread running V8 where the debug event occoured, but it never had any practical use, and prevents providing information to the message handler which is only available from the V8 thread.

In the future any thread decoupling will have do be done by the embedder.

This also removes the queue used for outbound messages.

Renamed the class Message to CommandMessage as it is only used for debugger commands from the client. Related message queue classes has also been renamed.
Review URL: http://codereview.chromium.org/93118

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-24 12:05:40 +00:00
pfeldman@chromium.org
a3a0d64305 DevTools: Add support for eventless host message dispatching.
Review URL: http://codereview.chromium.org/87026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 14:16:50 +00:00
yurys@chromium.org
344d68a938 This issue was introduced by http://codereview.chromium.org/67266
Review URL: http://codereview.chromium.org/93014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-22 13:04:19 +00:00
sgjesse@chromium.org
5b394bf4d1 Handle breaks on keyed IC loads which can have an inlined version.
For keyed IC loads setting a break point now ensures that the inlined code is not used. When the break point is set the inlined map check is changed to fail causing the inlined code not to be used but the IC to be called. As long at the break point is set the map check will stay invalid.
Review URL: http://codereview.chromium.org/87025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1756 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:48:54 +00:00
yurys@chromium.org
7fc551ecc3 As long as all debugger messages are handled by a single static method we need a way to identify request sender to route the response to the right handler. To accomplish this clients can send some additional data along with command text and debugger will later pass this data to the message handler along with the response text.
Review URL: http://codereview.chromium.org/67266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-21 14:06:48 +00:00
feng@chromium.org
ea48d53bad Add ENABLE_DEBUGGER_SUPPORT macro.
ENABLE_DEBUGGER_SUPPORT is enabled by default unless it is on Android platform.
On Android platform, it can also enabled by passing -DENABLE_DEBUGGER_SUPPORT flag to the compiler.

This should not affect any existing build (I hope, cross my fingers) except the build in real Android environment (in other word, it only affects me now).

There are lot of room for code refactoring in stead of using #ifdef all over the place. I will leave this to v8 folks.

Review URL: http://codereview.chromium.org/77035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-20 16:36:13 +00:00
sgjesse@chromium.org
9f7ccacf86 Add debug command break flag for debugger host dispatch.
Ensure that debugger host dispatch is processed even though there are no debugger commands in the queue.
Review URL: http://codereview.chromium.org/67180

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-15 19:09:38 +00:00
sgjesse@chromium.org
835b89b727 Fixed step in handling for function.call.
For function.call debug step in did not work as execution did not break in the function called. This has now been fixed using the same means as for function.apply in CL http://codereview.chromium.org/63055.
Review URL: http://codereview.chromium.org/63058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1684 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 12:11:43 +00:00
sgjesse@chromium.org
a74fcf458c Fixed the step in handling for function.apply.
The generic step-in mechanism floods the function called with break points to ensure a break is hit when entering the function. This generic mechanism was also used for function.apply. The code for function.apply contains a keyed load IC which was patched when stepping into function.apply. However function.apply enteres an internal frame not a JavaScript frame. This caused the logic for returning from the break in function.apply to fail as it forced a jump to the IC on the top JavaScript frame. The top JavaScript frame was the frame for the function calling function.apply not the frame for the apply function. Now returning from the break point in the keyed load IC in the apply code caused a jump to the code for the call IC for the function calling function.apply in the first place. Not a pretty sight.

Step-in now handles function.apply as a separate case where the actual JavaScript function called through apply is flodded with breakpoints instead of the function.apply function.

BUG=269
BUG=8210@chromium.org
Review URL: http://codereview.chromium.org/63055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-04-07 09:54:53 +00:00
sgjesse@chromium.org
1f7a7d9c58 Change handling of debugger unloading.
Add a semaphore for accessing debugger varaibles which can be changed from a different thread. This is mainly the debug message handler which can be set to NULL to disconnect the debugger.

Control the unloading of the debugger from the V8 thread. Before the debugger unload was called from the thread setting the debug message handler to NULL. This was not safe as this involves calling into V8. This change handles the unloading of the debugger either when entering a debugger event and the debugger was disconnected while the debugger was not active or when leaving the debugger and the debugger was disconnected while the debugger was active.

Add a flag to avoid unloading the debugger if debugger code is used by the application for other purposes than debugging.

Added tests for clearing the debug message handler.
Review URL: http://codereview.chromium.org/56102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-31 11:24:59 +00:00
sgjesse@chromium.org
d97a72c606 Correct debugger active check.
With r1627 (http://code.google.com/p/v8/source/detail?r=1627) the use of the debugger message thread was made optional. However the check for active debugger still included a check for the message thread. This is fixed by this change.
Review URL: http://codereview.chromium.org/58001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-30 08:16:14 +00:00
sgjesse@chromium.org
8b7a288e48 Debugger message handler can be called from V8 thread.
The message handler function set through the debugger API is normally called in a different thread than the V8 thread where execution is stopped due to debugger event. This change adds an option to the API for specifying that the message handler should be called directly from the V8 thread. For an application like Chrome where thread dispatching is already in place this makes more sense.

Add an option to the message handler debugger API to process messages in the thread where V8 is running instead of posting it to a queue for processing on a additional thread.
Review URL: http://codereview.chromium.org/42643

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1627 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 09:56:53 +00:00
christian.plesner.hansen@gmail.com
9142c42df2 Fixed a bunch of memory leaks in tests, including:
- String traversal test data (now in a zone)
 - Debug message thread (now joined on exit)
 - Threading test threads (now joined on exit)
 - Changed message tests framework to cope with valgrind
Also, fixed a bug where we'd try to delete stack-allocated objects
when tearing down v8.  Good times.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-27 00:24:49 +00:00
sgjesse@chromium.org
d8e53cf150 Extend debugger agent protocol with a connect message.Added a name of the embedding application when enabeling the debugger agent.Send a connection message from the debugger agent to the remote debugger when connecting. This message contains the V8 version, the protcol version (currently 1) and the name of the embedding application. Currently this information is just printed raw as received.
Review URL: http://codereview.chromium.org/52012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-23 22:23:39 +00:00
sgjesse@chromium.org
b3a4e60957 Better handling of startup and shutdown of the debugger agent.
During bind and listen socket errors are now handled. If the listen socket is occoupied the agent will retry its bind operation until success or shutdown.

Added orderly shutdown of the debugger agent both with and without a client connected.
Review URL: http://codereview.chromium.org/50007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-19 21:07:07 +00:00
sgjesse@chromium.org
6a9d16f40f Missed a few comment changes in r1508.
Review URL: http://codereview.chromium.org/42175

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-16 07:36:52 +00:00
sgjesse@chromium.org
17b498c957 A new stack guard break flag DEBUGCOMMAND has been introduced. This is used to signal debug break due to debugger commands available in the queue for processing. If a stack guard break happens with this flag and not the DEBUGBREAK flag the no debug break event is generated and execution is resumed automatically when all debugger commands in the queue has been processed.
This makes it possible to remote debuggers to just add commands to the queue without having to request a break as well. As soon as any JavaScript executes the debugger commands will be processed and the response send to the remote debugger.

Currently hide this behind a flag (--debugger-auto-break) as the current command line debugger in Chrome is not designed for this new behaviour, whereas the new Chrome developer tools will use it.
Review URL: http://codereview.chromium.org/42173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-13 13:26:21 +00:00
sgjesse@chromium.org
22d6605f2f All preemption requests are now ignored while in the debugger. This ensures that no change of V8 thread happenes while in the debugger. The only thing that happens is that a flag is set to indicate that preemption happened. When the debugger is left preemption is requested if it occourred while in the debugger.
Moved the debugger related global variables from Top to thread local in Debug.
Review URL: http://codereview.chromium.org/39124

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-06 11:03:14 +00:00
sgjesse@chromium.org
92aa4ab36c Add V8 debugger agent.
The debugger agent listens on a TCP/IP port for a remote debugger connection. When such a connection is established the debuger JSON protocol is communicated between the agent the the remote debugger. The messages containing the JSON protocol has a RFC-822 like header with a Content-Length field and with the body containing the JSON in UTF-8 encoding.

The D8 shell has option --debugger-agent to start the debugger agent.
Review URL: http://codereview.chromium.org/27355

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-03-03 12:23:45 +00:00
iposva@chromium.org
c093e94546 - Pass the knowledge whether the old GC is compacting to the GC prologue and epilogue. This allows us to skip frame cooking and uncooking when doing a mark-sweep GC.
- Add the ability for the code to refer to its code object by adding a handle to the code object in the MacroAssembler.

Review URL: http://codereview.chromium.org/27133

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-25 16:52:15 +00:00
sgjesse@chromium.org
44b83d3e77 Add host callback for debug break.
Add the ability to have the host embedding V8 receive a callback in the V8 thread while V8 is processing a debug callback. When V8 is processing a debug callback the thread where V8 is executing is sitting in a tight loop processing debug commands until the continue command has been executed. In some embedding situations it is beneficial to be able to call back into the embedding host from the thread where V8 is sitting. The might have functions which needs to be called to complement the JavaScript debugging.

Using the uint16_t array to pass a void* is a temporary hack.
Review URL: http://codereview.chromium.org/20491

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-19 14:02:42 +00:00
sgjesse@chromium.org
ceef7cb854 Make the debugger completely unload when the debug event listener is unregistered.
Added a number of handle scopes to the debugger code to keep handles local to the function using them.

Fixed SetDebugEventListener to actually unregister when passed a NULL pointer. Previously this NULL pointer was wrapped in a Proxy.

BUG=1242702
Review URL: http://codereview.chromium.org/21347

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-13 12:36:58 +00:00
sgjesse@chromium.org
a85f5c86bc Moved some IA32 specific code from to the architecture dependent part of the debugger code.
Renamed functions related to patching of code with call instructions to match the naming conversion.

BUG=1240753
Review URL: http://codereview.chromium.org/20176

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-09 12:17:39 +00:00
sgjesse@chromium.org
f7f4cb1c33 Fixed the debugger compile events.
The debugger compile events (BeforeCompile and AfterCompile) have not been used by any V8 debuggers lately and where actually not working any more. Added the correct information to the compile event.

Added a simple 'trace compile' command to the developer shell for testing.

Added a test for compile evnets.
Review URL: http://codereview.chromium.org/21076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-05 10:10:45 +00:00
sgjesse@chromium.org
d131ecf3dd Changed the debugger API to allow only one debug event listener to be registered. The public API now only has SetDebugEventListener instead of AddDebugEventListener and RemoveDebugEventListener.
Moved the registrered debug event listener from the context to a global handle in the Debugger class. Storing it in the context did not make much sense.

Changed a lot of tests to handle the API change.

BUG=1242707
Review URL: http://codereview.chromium.org/19753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 07:59:12 +00:00
sgjesse@chromium.org
c2c780bfc4 Added handles to the mirror objects. When a mirror for an object is created
it is assigned a numeric handle. Handles are used to make a 1:1
correspondence between objects and mirrors. Currently the mirrors are
cached in a JavaScript array and when creating a mirror this cache is
checked to see if a mirror already exists for the object. This cache is
cleared when leaving the debugger.

Changed the serialization format to take advantage of these handles. When
an object is serialized referenced objects are represented just by their
handle id serialized as '{ref:<handle>}'. During serialization the
referenced handles are collected and the serializer can provide a
serialization of all the referenced objects.

Removed the special handling of array properties. Indexed properties and
the length property are now rendered as named properties in the
serialization.

Removed the special serialization handling of RegExp properties. The
properties 'source', 'global', 'ignoreCase' and 'multiline' are serialized
with the rest of the properties.

Changed a lot of tests to handle the changed format.
Review URL: http://codereview.chromium.org/18092

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-16 09:54:46 +00:00
sgjesse@chromium.org
dc2a0ec3e9 Reverted r1078 as it was committed by accident without review.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:29:05 +00:00
sgjesse@chromium.org
6bc1d40a57 Added handles to the mirror objects. When a mirror for an object is created it is assigned a numeric handle. Handles are used to make a 1:1 correspondence between objects and mirrors. Currently the mirrors are cached in a JavaScript array and when creating a mirror this cache is checked to see if a mirror already exists for the object. This cache is cleared when leaving the debugger.
Changed the serialization format to take advantage of these handles. When an object is serialized referenced objects are represented just by their handle id serialized as '{ref:<handle>}'. During serialization the referenced handles are collected and the serializer can provide a serialization of all the referenced objects.

Removed the special handling of array properties. Indexed properties and the length property are now rendered as named properties in the serialization.

Removed the special serialization handling of RegExp properties. The properties 'source', 'global', 'ignoreCase' and 'multiline' are serialized with the rest of the properties.

Changed a lot of tests to handle the changed format.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:10:34 +00:00