RESOLVED FIXED 219418
Fix crash with performance.measure() with negative duration
https://bugs.webkit.org/show_bug.cgi?id=219418
Summary Fix crash with performance.measure() with negative duration
Julian Gonzalez
Reported 2020-12-01 18:11:24 PST
If the `duration` field passed to performance.measure() is negative, we expect to throw an Exception. However, due to a typo in PerformanceUserTiming::measure() we actually crash. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.WebCore 0x000000014e15f23b WTFCrashWithInfo(int, char const*, char const*, int) + 27 (Assertions.h:671) 1 com.apple.WebCore 0x000000014e219500 std::experimental::fundamentals_v3::__expected_detail::__expected_terminate() + 48 (Expected.h:231) 2 com.apple.WebCore 0x000000014fab6cd6 std::experimental::fundamentals_v3::expected<double, WebCore::Exception>::error() & + 70 (Expected.h:497) 3 com.apple.WebCore 0x000000014fab6c21 WebCore::ExceptionOr<double>::releaseException() + 17 (ExceptionOr.h:124) 4 com.apple.WebCore 0x0000000152a640a9 WebCore::PerformanceUserTiming::measure(JSC::JSGlobalObject&, WTF::String const&, WebCore::PerformanceMeasureOptions const&) + 2057 (PerformanceUserTiming.cpp:214) 5 com.apple.WebCore 0x0000000152a7d28e WebCore::PerformanceUserTiming::measure(JSC::JSGlobalObject&, WTF::String const&, WTF::Optional<WTF::Variant<WTF::String, WebCore::PerformanceMeasureOptions> >&&, WTF::String const&)::$_1::operator()(WebCore::PerformanceMeasureOptions const&) const + 670 (PerformanceUserTiming.cpp:273) <rdar://problem/71238176>
Attachments
Patch (4.79 KB, patch)
2020-12-01 18:18 PST, Julian Gonzalez
no flags
Julian Gonzalez
Comment 1 2020-12-01 18:18:02 PST
EWS
Comment 2 2020-12-02 11:07:38 PST
Committed r270355: <https://trac.webkit.org/changeset/270355> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415181 [details].
Note You need to log in before you can comment on or make changes to this bug.