diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 12:29:29 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-30 12:29:29 +0000 |
commit | 7d98e70ebe1e4d06ceff625017ff11eea71f2e72 (patch) | |
tree | e7a6febc681a3096eafe19147168496334e5dd67 /webkit/glue | |
parent | 1443f5a937938725225a314098bd84414e622e2a (diff) | |
download | chromium_src-7d98e70ebe1e4d06ceff625017ff11eea71f2e72.zip chromium_src-7d98e70ebe1e4d06ceff625017ff11eea71f2e72.tar.gz chromium_src-7d98e70ebe1e4d06ceff625017ff11eea71f2e72.tar.bz2 |
DevTools: support null callbacks in the frontend, encapsulate node ids.
Review URL: http://codereview.chromium.org/57004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/devtools/js/devtools_callback.js | 2 | ||||
-rw-r--r-- | webkit/glue/devtools/js/dom_agent.js | 9 | ||||
-rw-r--r-- | webkit/glue/devtools/js/inspector_controller_impl.js | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/webkit/glue/devtools/js/devtools_callback.js b/webkit/glue/devtools/js/devtools_callback.js index 0c344d9..f252861 100644 --- a/webkit/glue/devtools/js/devtools_callback.js +++ b/webkit/glue/devtools/js/devtools_callback.js @@ -25,7 +25,7 @@ devtools.Callback = function() { */ devtools.Callback.prototype.wrap = function(callback) { var callbackId = this.lastCallbackId_++; - this.callbacks_[callbackId] = callback; + this.callbacks_[callbackId] = callback || function() {}; return callbackId; }; diff --git a/webkit/glue/devtools/js/dom_agent.js b/webkit/glue/devtools/js/dom_agent.js index ebcba55..880d508 100644 --- a/webkit/glue/devtools/js/dom_agent.js +++ b/webkit/glue/devtools/js/dom_agent.js @@ -223,13 +223,10 @@ devtools.DomNode.prototype.setAttribute = function(name, value) { devtools.DomNode.prototype.removeAttribute = function(name) { var self = this; this.ownerDocument.domAgent_.removeAttributeAsync(this, name, function() { - if (!success) { - return; - } delete self.attributesMap_[name]; - for (var i = 0; i < self.attributes_.length; ++i) { - if (self.attributes_[i].name == name) { - self.attributes_.splice(i, 1); + for (var i = 0; i < self.attributes.length; ++i) { + if (self.attributes[i].name == name) { + self.attributes.splice(i, 1); break; } } diff --git a/webkit/glue/devtools/js/inspector_controller_impl.js b/webkit/glue/devtools/js/inspector_controller_impl.js index 9540516..e199bd1 100644 --- a/webkit/glue/devtools/js/inspector_controller_impl.js +++ b/webkit/glue/devtools/js/inspector_controller_impl.js @@ -77,7 +77,7 @@ devtools.InspectorControllerImpl.prototype.hideDOMNodeHighlight = function() { */ devtools.InspectorControllerImpl.prototype.highlightDOMNode = function(hoveredNode) { - RemoteToolsAgent.HighlightDOMNode(hoveredNode.id); + RemoteToolsAgent.HighlightDOMNode(hoveredNode.id_); }; |