Title: [196018] trunk/Source/WebInspectorUI
Revision
196018
Author
[email protected]
Date
2016-02-02 10:52:28 -0800 (Tue, 02 Feb 2016)

Log Message

Uncaught Exception: TypeError: undefined is not an object (evaluating 'highlightedRange.from')
https://bugs.webkit.org/show_bug.cgi?id=153685

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
The highlighted range could have just gotten removed, in which case the
marker would return undefined. Just bail in such cases.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (196017 => 196018)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-02-02 18:51:42 UTC (rev 196017)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-02-02 18:52:28 UTC (rev 196018)
@@ -1,3 +1,15 @@
+2016-02-02  Joseph Pecoraro  <[email protected]>
+
+        Uncaught Exception: TypeError: undefined is not an object (evaluating 'highlightedRange.from')
+        https://bugs.webkit.org/show_bug.cgi?id=153685
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
+        (WebInspector.CodeMirrorTokenTrackingController.prototype.highlightRange):
+        The highlighted range could have just gotten removed, in which case the
+        marker would return undefined. Just bail in such cases.
+
 2016-02-01  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Option+Up/Down should not move cursor outside of number

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js (196017 => 196018)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2016-02-02 18:51:42 UTC (rev 196017)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorTokenTrackingController.js	2016-02-02 18:52:28 UTC (rev 196018)
@@ -164,6 +164,8 @@
         // Nothing to do if we're trying to highlight the same range.
         if (this._codeMirrorMarkedText && this._codeMirrorMarkedText.className === this._classNameForHighlightedRange) {
             var highlightedRange = this._codeMirrorMarkedText.find();
+            if (!highlightedRange)
+                return;
             if (WebInspector.compareCodeMirrorPositions(highlightedRange.from, range.start) === 0 &&
                 WebInspector.compareCodeMirrorPositions(highlightedRange.to, range.end) === 0)
                 return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to