2011-03-04 Andrey Kosyakov <caseq@chromium.org>
authorcaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2011 16:25:20 +0000 (16:25 +0000)
committercaseq@chromium.org <caseq@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2011 16:25:20 +0000 (16:25 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: exceptions when building context menu in network panel
        https://bugs.webkit.org/show_bug.cgi?id=55678

        * inspector/front-end/DataGrid.js:
        (WebInspector.DataGrid.prototype.dataGridNodeFromNode):
        (WebInspector.DataGrid.prototype.dataGridNodeFromPoint):
        * inspector/front-end/NetworkPanel.js:
        (WebInspector.NetworkPanel.prototype._contextMenu):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80354 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/DataGrid.js
Source/WebCore/inspector/front-end/NetworkPanel.js

index 6f9d62d..43705ba 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-04  Andrey Kosyakov  <caseq@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: exceptions when building context menu in network panel
+        https://bugs.webkit.org/show_bug.cgi?id=55678
+
+        * inspector/front-end/DataGrid.js:
+        (WebInspector.DataGrid.prototype.dataGridNodeFromNode):
+        (WebInspector.DataGrid.prototype.dataGridNodeFromPoint):
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkPanel.prototype._contextMenu):
+
 2011-03-04  Ilya Sherman  <isherman@chromium.org>
 
         Reviewed by James Robinson.
index 45f0b55..6d54941 100644 (file)
@@ -809,14 +809,14 @@ WebInspector.DataGrid.prototype = {
     dataGridNodeFromNode: function(target)
     {
         var rowElement = target.enclosingNodeOrSelfWithNodeName("tr");
-        return rowElement._dataGridNode;
+        return rowElement && rowElement._dataGridNode;
     },
 
     dataGridNodeFromPoint: function(x, y)
     {
         var node = this._dataTable.ownerDocument.elementFromPoint(x, y);
         var rowElement = node.enclosingNodeOrSelfWithNodeName("tr");
-        return rowElement._dataGridNode;
+        return rowElement && rowElement._dataGridNode;
     },
 
     _clickInHeaderCell: function(event)
index c83b76c..a48803a 100644 (file)
@@ -972,7 +972,7 @@ WebInspector.NetworkPanel.prototype = {
     _contextMenu: function(event)
     {
         // createBlobURL is enabled conditionally, do not expose resource export if it's not available.
-        if (typeof window.webkitURL.createObjectURL !== "function" || !Preferences.resourceExportEnabled)
+        if ((window.webkitURL && typeof window.webkitURL.createObjectURL !== "function") || !Preferences.resourceExportEnabled)
             return;
 
         var contextMenu = new WebInspector.ContextMenu();