Web Inspector: fix test case failures in js-isLikelyStackTrace.html
https://bugs.webkit.org/show_bug.cgi?id=180664
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-09-12
Reviewed by Devin Rousso.
Source/WebInspectorUI:
* UserInterface/Models/StackTrace.js:
(WI.StackTrace.isLikelyStackTrace):
In a quick benchmark 50% of the time was rebuilding the same complex regular
expression over and over again. Instead just build the regex once and reset
it before each use.
LayoutTests:
* inspector/console/js-isLikelyStackTrace-expected.txt:
* inspector/console/js-isLikelyStackTrace.html:
Avoid Inspector Internal InjectedScript code in backtraces by producing
the exception stacks in the page itself without going through inspector
test evaluation code. This produces exception stacks more like a page.
Also add some explicit tests for strings that we'd expect to be classified
as exception stacks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235939
268f45cc-cd09-0410-ab3c-
d52691b4dbfc