diff options
author | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 14:13:04 +0000 |
---|---|---|
committer | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 14:13:04 +0000 |
commit | 9b9d728c445b3c1c2ac0b3f66753a205dc2eafc3 (patch) | |
tree | d52354b9d35df88bff508b5936a7fd9b98f31d55 /webkit/glue/webdevtoolsagent_impl.cc | |
parent | 51a5ea2a6ef9d361b62ef1e6f3590131ac395cea (diff) | |
download | chromium_src-9b9d728c445b3c1c2ac0b3f66753a205dc2eafc3.zip chromium_src-9b9d728c445b3c1c2ac0b3f66753a205dc2eafc3.tar.gz chromium_src-9b9d728c445b3c1c2ac0b3f66753a205dc2eafc3.tar.bz2 |
1. All debugger messages are dispatched in a static method on the IO thread. All responses from the v8 go to another static method where we should find out which devtool agent delegate should be used for sending the response. We use call_id to match request with the delegate its response should be sent to. We don't pass the delegate directly as it's designed to be accessed on the render thread only.
To match debug command response with its request the request sequence number is replaced with a number that is unique across the renderer(note that requests from different clients may have equal ids so we cannot rely on them). This happens before the command gets to the v8. When the command response is ready the original request_seq is restored. Before that the request_seq field is used to find out which devtools agent delegate should be used for sending the response.
2. For the debugger events we derive target agent from the current v8 execution context. If there is no agent attached to the RenderView owning that context 'continue' command is sent to the v8 automatically and the message is ignored.
Review URL: http://codereview.chromium.org/62106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13347 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webdevtoolsagent_impl.cc')
-rw-r--r-- | webkit/glue/webdevtoolsagent_impl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/glue/webdevtoolsagent_impl.cc b/webkit/glue/webdevtoolsagent_impl.cc index 5a4c4b4..e5cf8ad 100644 --- a/webkit/glue/webdevtoolsagent_impl.cc +++ b/webkit/glue/webdevtoolsagent_impl.cc @@ -59,7 +59,9 @@ void WebDevToolsAgentImpl::Attach() { return; } debugger_agent_impl_.set( - new DebuggerAgentImpl(debugger_agent_delegate_stub_.get())); + new DebuggerAgentImpl(web_view_impl_, + debugger_agent_delegate_stub_.get(), + this)); dom_agent_impl_.set(new DomAgentImpl(dom_agent_delegate_stub_.get())); net_agent_impl_.set(new NetAgentImpl(net_agent_delegate_stub_.get())); @@ -236,6 +238,8 @@ void WebDevToolsAgentImpl::SendRpcMessage(const std::string& raw_msg) { } // static -void WebDevToolsAgent::ExecuteDebuggerCommand(const std::string& command) { - DebuggerAgentManager::ExecuteDebuggerCommand(command); +void WebDevToolsAgent::ExecuteDebuggerCommand( + const std::string& command, + WebDevToolsAgent* webdevtools_agent) { + DebuggerAgentManager::ExecuteDebuggerCommand(command, webdevtools_agent); } |