Bug 193156

Summary: A MediaTime timescale must never be zero
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, jer.noble, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews104 for mac-sierra-wk2
none
Archive of layout-test-results from ews102 for mac-sierra
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews114 for mac-sierra
none
Patch
none
Patch for landing none

Description Eric Carlson 2019-01-04 13:32:08 PST
The MediaTime's timescale is frequently used as a divisor, so don't allow it to be zero.
Comment 1 Eric Carlson 2019-01-04 15:35:56 PST
Created attachment 358385 [details]
Patch
Comment 2 Eric Carlson 2019-01-04 15:37:04 PST
<rdar://problem/32504501>
Comment 3 Eric Carlson 2019-01-04 16:53:24 PST
Created attachment 358398 [details]
Patch
Comment 4 EWS Watchlist 2019-01-04 17:50:33 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10635031

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
webaudio/silence-after-playback.html
Comment 5 EWS Watchlist 2019-01-04 17:50:35 PST
Created attachment 358406 [details]
Archive of layout-test-results from ews104 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2019-01-04 17:58:15 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10635317

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
webaudio/silence-after-playback.html
Comment 7 EWS Watchlist 2019-01-04 17:58:17 PST
Created attachment 358407 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2019-01-04 18:47:06 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10635436

New failing tests:
imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html
Comment 9 EWS Watchlist 2019-01-04 18:47:08 PST
Created attachment 358417 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 10 EWS Watchlist 2019-01-04 19:06:19 PST
Comment on attachment 358398 [details]
Patch

Attachment 358398 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10635518

New failing tests:
http/wpt/css/css-animations/start-animation-001.html
webaudio/silence-after-playback.html
Comment 11 EWS Watchlist 2019-01-04 19:06:21 PST
Created attachment 358420 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 12 Eric Carlson 2019-01-05 12:45:59 PST
Created attachment 358442 [details]
Patch
Comment 13 Jer Noble 2019-01-07 10:14:51 PST
Comment on attachment 358442 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=358442&action=review

r=me with nit:

> Source/WTF/wtf/MediaTime.cpp:90
> +    if (value < 0)
> +        *this = negativeInfiniteTime();
> +    else
> +        *this = positiveInfiniteTime();

Nit: in other places you use a ternary operator for this kind of thing.
Comment 14 Eric Carlson 2019-01-07 11:20:17 PST
Created attachment 358510 [details]
Patch for landing
Comment 15 WebKit Commit Bot 2019-01-07 11:59:29 PST
Comment on attachment 358510 [details]
Patch for landing

Clearing flags on attachment: 358510

Committed r239688: <https://trac.webkit.org/changeset/239688>
Comment 16 WebKit Commit Bot 2019-01-07 11:59:31 PST
All reviewed patches have been landed.  Closing bug.