Title: [182104] trunk/Source/WebInspectorUI
Revision
182104
Author
commit-qu...@webkit.org
Date
2015-03-27 21:41:47 -0700 (Fri, 27 Mar 2015)

Log Message

Web Inspector: Uncaught exception while debugging, after performSearch callback line does not exists
https://bugs.webkit.org/show_bug.cgi?id=143172

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-03-27
Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
Gracefully handle if the line does not exist.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (182103 => 182104)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-03-28 04:18:13 UTC (rev 182103)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-03-28 04:41:47 UTC (rev 182104)
@@ -1,3 +1,15 @@
+2015-03-27  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: Uncaught exception while debugging, after performSearch callback line does not exists
+        https://bugs.webkit.org/show_bug.cgi?id=143172
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/SourceCodeTextEditor.js:
+        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch.searchResultCallback):
+        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
+        Gracefully handle if the line does not exist.
+
 2015-03-27  Ryosuke Niwa  <rn...@webkit.org>
 
         ES6 Classes: Runtime error in JIT'd class calling super() with arguments and superclass has default constructor

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (182103 => 182104)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2015-03-28 04:18:13 UTC (rev 182103)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2015-03-28 04:41:47 UTC (rev 182104)
@@ -187,6 +187,8 @@
             for (var i = 0; i < matches.length; ++i) {
                 var matchLineNumber = matches[i].lineNumber;
                 var line = this.line(matchLineNumber);
+                if (!line)
+                    return;
 
                 // Reset the last index to reuse the regex on a new line.
                 queryRegex.lastIndex = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to