Web Inspector: fix test case failures in js-isLikelyStackTrace.html
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2018 16:34:09 +0000 (16:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Sep 2018 16:34:09 +0000 (16:34 +0000)
commit5be8213e1a9056dbc37e3429320d64187f24ffd3
treed5cddd3889a8644a41dc2789570d7a94b6edaef0
parent42c5d6aac883b79b5182a234cdf8da1293d41ae0
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
LayoutTests/ChangeLog
LayoutTests/inspector/console/js-isLikelyStackTrace-expected.txt
LayoutTests/inspector/console/js-isLikelyStackTrace.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/StackTrace.js