Title: [136220] trunk/Source/WebCore
Revision
136220
Author
[email protected]
Date
2012-11-30 02:52:25 -0800 (Fri, 30 Nov 2012)

Log Message

Web Inspector: [Timeline] JS error when clicking in Memory Statistics view
https://bugs.webkit.org/show_bug.cgi?id=103486

Patch by Sankeerth V S <[email protected]> on 2012-11-30
Reviewed by Alexander Pavlov.

The counter value can be null/undefined. Hence a check is needed
before we access the "time" property on this counter object.

No new tests required as UI related change.

* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype._onClick):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (136219 => 136220)


--- trunk/Source/WebCore/ChangeLog	2012-11-30 10:32:32 UTC (rev 136219)
+++ trunk/Source/WebCore/ChangeLog	2012-11-30 10:52:25 UTC (rev 136220)
@@ -1,3 +1,18 @@
+2012-11-30  Sankeerth V S  <[email protected]>
+
+        Web Inspector: [Timeline] JS error when clicking in Memory Statistics view
+        https://bugs.webkit.org/show_bug.cgi?id=103486
+
+        Reviewed by Alexander Pavlov.
+
+        The counter value can be null/undefined. Hence a check is needed
+        before we access the "time" property on this counter object.
+
+        No new tests required as UI related change.
+
+        * inspector/front-end/MemoryStatistics.js:
+        (WebInspector.MemoryStatistics.prototype._onClick):
+
 2012-11-30  Kent Tamura  <[email protected]>
 
         Fix typos in DateTimeNumericFieldElement.cpp and DateTimeSymbolicFieldElement.cpp

Modified: trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js (136219 => 136220)


--- trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js	2012-11-30 10:32:32 UTC (rev 136219)
+++ trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js	2012-11-30 10:52:25 UTC (rev 136220)
@@ -314,10 +314,11 @@
 
     _onClick: function(event)
     {
-        var x = event.x - event.target.offsetParent.offsetLeft
+        var x = event.x - event.target.offsetParent.offsetLeft;
         var i = this._recordIndexAt(x);
         var counter = this._counters[i];
-        this._timelinePanel.revealRecordAt(counter.time / 1000);
+        if (counter)
+            this._timelinePanel.revealRecordAt(counter.time / 1000);
     },
 
     _onMouseOut: function(event)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to