haikuwebkit/LayoutTests/performance-api
Julian Gonzalez 9b3b45a1c9 Fix crash with performance.measure() with negative duration
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
2020-12-02 19:07:32 +00:00
..
paint-timing Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
resources Fix crash with performance.measure() with negative duration 2020-12-02 19:07:32 +00:00
performance-mark-name-expected.txt
performance-mark-name.html Support Performance API (performance.now(), UserTiming) in Workers 2017-02-02 22:07:28 +00:00
performance-measure-name-expected.txt Update User Timing interfaces to User Timing Level 3 2020-09-22 08:46:36 +00:00
performance-measure-name.html [User Timing] Throw a SyntaxError for performance.measure if mark name is not found 2017-02-22 05:43:50 +00:00
performance-now-api-expected.txt Update User Timing interfaces to User Timing Level 3 2020-09-22 08:46:36 +00:00
performance-now-api.html LayoutTest performance-api/performance-observer-basic.html is a flaky timeout 2017-03-03 11:38:58 +00:00
performance-now-time-origin-in-worker-expected.txt
performance-now-time-origin-in-worker.html
performance-observer-api-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
performance-observer-api.html Support Performance API (performance.now(), UserTiming) in Workers 2017-02-02 22:07:28 +00:00
performance-observer-basic-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
performance-observer-basic.html
performance-observer-callback-after-gc-expected.txt
performance-observer-callback-after-gc.html
performance-observer-callback-mutate-expected.txt
performance-observer-callback-mutate.html
performance-observer-callback-task-expected.txt
performance-observer-callback-task.html
performance-observer-entry-sort-expected.txt
performance-observer-entry-sort.html REGRESSION: performance-api/performance-observer-entry-sort.html is flaky 2018-05-25 03:21:28 +00:00
performance-observer-exception-expected.txt
performance-observer-exception.html
performance-observer-nested-expected.txt
performance-observer-nested.html
performance-observer-no-document-leak-expected.txt
performance-observer-no-document-leak.html
performance-observer-order-expected.txt
performance-observer-order.html
performance-observer-periodic-expected.txt
performance-observer-periodic.html
performance-timeline-api-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
performance-timeline-api.html Support Performance API (performance.now(), UserTiming) in Workers 2017-02-02 22:07:28 +00:00
performance-timeline-serializers-expected.txt
performance-timeline-serializers.html Performance Timeline: Add serializer to PerformanceEntry 2017-01-31 08:57:48 +00:00
resource-timing-apis-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
resource-timing-apis.html [Resource Timing] Support Resource Timing in Workers 2017-02-16 19:18:32 +00:00
user-timing-apis-expected.txt Fix crash with performance.measure() with negative duration 2020-12-02 19:07:32 +00:00
user-timing-apis.html