diff options
author | sgjesse@google.com <sgjesse@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-29 11:07:40 +0000 |
---|---|---|
committer | sgjesse@google.com <sgjesse@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-29 11:07:40 +0000 |
commit | 88010e083e2d9c235120b7f8702fe82d7620b2e9 (patch) | |
tree | 985f6248f736dd86d27ab7733768ad8d2300bb1a /chrome/browser/debugger/debugger_wrapper.cc | |
parent | 466c8a51142090c6b475d72acd380ce72a10bfe9 (diff) | |
download | chromium_src-88010e083e2d9c235120b7f8702fe82d7620b2e9.zip chromium_src-88010e083e2d9c235120b7f8702fe82d7620b2e9.tar.gz chromium_src-88010e083e2d9c235120b7f8702fe82d7620b2e9.tar.bz2 |
Made changes to the JavaScript debugger in preparing for an upcoming
change in V8 where the implicit breaks currently issued when receiving
a command while running will be removed. To get in contact with the
V8 debugging interface and send messages V8 needs to be in the break
state. Getting V8 into the break state will be the responsebility of the
debugger using the V8 debugging interface.
Changed the messages between the renderer and the debugger. There are now
explicit messages for break and detach. Alse renamed the SendToDebugger
message to DebugCommand. There is now messages DebugAttach, DebugBreak,
DebugCommand and DebugDetach. The message DebugBreak has a force flag
to indicate whether the renderer should issue some JavaScript to help
the break along or whether it should just schedule a break to happen
whenever JavaScript executes.
Removed the artificial attach JSON response send by the renderer and
replaced that with an on debug attach call to the debugger shell. This
call is reouted to the on_attach function in the debugger JavScript code.
Changed the debugger to issue break requests whenever a suitable command,
e.g. setting a break point, is issued. In this case a flag is used to
track whether execution should be automatically resumed after the command
have been send to the V8 debugger interface. Changed the handling of the
plain break event to not force a break by executing additional JavaScript.
Thereby a plain break does not break JavaScript execution until code on
the tab beeing debugged is actually executed.
Set the command name explicitly on all commands.
Removed parseSimpleCommand as it was just used for the the continue command
for which an explicit parseContinueCommand has been added.
Removed the last_command field from DebugShell as it was not used.
Updated the debugger protocol test to reflect the removed attach event.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger/debugger_wrapper.cc')
-rw-r--r-- | chrome/browser/debugger/debugger_wrapper.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/debugger/debugger_wrapper.cc b/chrome/browser/debugger/debugger_wrapper.cc index 847fab7..9b29903 100644 --- a/chrome/browser/debugger/debugger_wrapper.cc +++ b/chrome/browser/debugger/debugger_wrapper.cc @@ -32,6 +32,11 @@ void DebuggerWrapper::DebugMessage(const std::wstring& msg) { debugger_->DebugMessage(msg); } +void DebuggerWrapper::OnDebugAttach() { + if (debugger_.get()) + debugger_->OnDebugAttach(); +} + void DebuggerWrapper::OnDebugDisconnect() { if (debugger_.get()) debugger_->OnDebugDisconnect(); |