Properly null check positionToReveal in ResourceSidebarPanel.prototype.showSourceCode.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2013 03:49:36 +0000 (03:49 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Nov 2013 03:49:36 +0000 (03:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123921

Reviewed by Joseph Pecoraro.

* UserInterface/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showSourceCode):

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/ResourceSidebarPanel.js

index 611bc6a..0b707a9 100644 (file)
@@ -1,5 +1,16 @@
 2013-11-06  Timothy Hatcher  <timothy@apple.com>
 
+        Properly null check positionToReveal in ResourceSidebarPanel.prototype.showSourceCode.
+
+        https://bugs.webkit.org/show_bug.cgi?id=123921
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/ResourceSidebarPanel.js:
+        (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
+
+2013-11-06  Timothy Hatcher  <timothy@apple.com>
+
         Fix the display of query parameters when the value is missing. 
 
         https://bugs.webkit.org/show_bug.cgi?id=123920
index 88cbb76..5cd90be 100644 (file)
@@ -151,7 +151,7 @@ WebInspector.ResourceSidebarPanel.prototype = {
             representedObject = representedObject.parentFrame;
 
         var newContentView = WebInspector.contentBrowser.contentViewForRepresentedObject(representedObject);
-        var cookie = {lineNumber: positionToReveal.lineNumber, columnNumber: positionToReveal.columnNumber};
+        var cookie = positionToReveal ? {lineNumber: positionToReveal.lineNumber, columnNumber: positionToReveal.columnNumber} : {};
 
         WebInspector.contentBrowser.showContentView(newContentView, cookie);
     },