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.h | |
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.h')
-rw-r--r-- | webkit/glue/webdevtoolsagent.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/glue/webdevtoolsagent.h b/webkit/glue/webdevtoolsagent.h index e96cfc1..30b7b5d5 100644 --- a/webkit/glue/webdevtoolsagent.h +++ b/webkit/glue/webdevtoolsagent.h @@ -24,7 +24,9 @@ class WebDevToolsAgent { virtual void InspectElement(int x, int y) = 0; // Asynchronously executes debugger command in the render thread. - static void ExecuteDebuggerCommand(const std::string& command); + // |webdevtools_agent| will be used for sending response. + static void ExecuteDebuggerCommand(const std::string& command, + WebDevToolsAgent* webdevtools_agent); private: DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgent); |