Commit e0d483aa authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

2010-12-20 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: fall back to object formatting in case dom is not yet loaded.
        https://bugs.webkit.org/show_bug.cgi?id=44273

        Sometimes DOM is loaded after the inline message is being formatted, so we get
        no nodeId for it. Let us fall back to object formatting in such cases.

        * inspector/front-end/ConsoleView.js:
        (WebInspector.ConsoleView.prototype._formatnode):
        (WebInspector.ConsoleMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 09aafa58
2010-12-20 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Yury Semikhatsky.
Web Inspector: fall back to object formatting in case dom is not yet loaded.
https://bugs.webkit.org/show_bug.cgi?id=44273
Sometimes DOM is loaded after the inline message is being formatted, so we get
no nodeId for it. Let us fall back to object formatting in such cases.
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._formatnode):
(WebInspector.ConsoleMessage):
2010-12-20 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Joseph Pecoraro.
......
......@@ -563,8 +563,12 @@ WebInspector.ConsoleView.prototype = {
{
function printNode(nodeId)
{
if (!nodeId)
if (!nodeId) {
// Sometimes DOM is loaded after the sync message is being formatted, so we get no
// nodeId here. So we fall back to object formatting here.
this._formatobject(object, elem);
return;
}
var treeOutline = new WebInspector.ElementsTreeOutline();
treeOutline.showInElementsPanelEnabled = true;
treeOutline.rootDOMNode = WebInspector.domAgent.nodeForId(nodeId);
......@@ -573,8 +577,7 @@ WebInspector.ConsoleView.prototype = {
treeOutline.element.addStyleClass("single-node");
elem.appendChild(treeOutline.element);
}
object.pushNodeToFrontend(printNode);
object.pushNodeToFrontend(printNode.bind(this));
},
_formatarray: function(arr, elem)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment