https://bugs.webkit.org/show_bug.cgi?id=219418
Patch by Julian Gonzalez <julian_a_gonzalez@apple.com> on 2020-12-02
Reviewed by Alex Christensen.
Source/WebCore:
In PerformanceUserTiming::measure(), the wrong variable is used
to look up the exception to return if an invalid duration
value is provided.
Updated user-timing-apis test to catch this crash.
* page/PerformanceUserTiming.cpp:
(WebCore::PerformanceUserTiming::measure):
LayoutTests:
Add a test to verify that an Exception is thrown when
passing a negative duration to performance.measure(),
instead of a crash occurring.
* performance-api/resources/user-timing-api.js:
* performance-api/user-timing-apis-expected.txt:
Canonical link: https://commits.webkit.org/232046@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270355 268f45cc-cd09-0410-ab3c-d52691b4dbfc