diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 13:27:55 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 13:27:55 +0000 |
commit | ef42ecf401127e5ea585c9d4b7b82ba9eda506f0 (patch) | |
tree | 2697bdb3acea6ce8cdb10fd29f83a809e410008d | |
parent | 79fd99da7e0027606fd345d7881ae2fbf503fa01 (diff) | |
download | chromium_src-ef42ecf401127e5ea585c9d4b7b82ba9eda506f0.zip chromium_src-ef42ecf401127e5ea585c9d4b7b82ba9eda506f0.tar.gz chromium_src-ef42ecf401127e5ea585c9d4b7b82ba9eda506f0.tar.bz2 |
DevTools: fix crash when inspect element invoked on the root element.
Review URL: http://codereview.chromium.org/131106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18805 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/devtools/dom_agent_impl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/glue/devtools/dom_agent_impl.cc b/webkit/glue/devtools/dom_agent_impl.cc index de3c0b7..bcd477c 100644 --- a/webkit/glue/devtools/dom_agent_impl.cc +++ b/webkit/glue/devtools/dom_agent_impl.cc @@ -277,6 +277,10 @@ void DomAgentImpl::GetChildNodes(int call_id, int element_id) { int DomAgentImpl::PushNodePathToClient(Node* node_to_select) { ASSERT(node_to_select); // Invalid input + // If we are sending information to the client that is currently being + // created. Send root node first. + PushDocumentElementToClient(); + // Return id in case the node is known. int result = GetIdForNode(node_to_select); if (result) @@ -285,10 +289,6 @@ int DomAgentImpl::PushNodePathToClient(Node* node_to_select) { Element* element = InnerParentElement(node_to_select); ASSERT(element); // Node is detached or is a document itself - // If we are sending information to the client that is currently being - // created. Send root node first. - PushDocumentElementToClient(); - Vector<Element*> path; while (element && !GetIdForNode(element)) { path.append(element); |