Bug 159269 - [Mac] Crash registering AVFoundation media engine
Summary: [Mac] Crash registering AVFoundation media engine
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-29 12:39 PDT by Eric Carlson
Modified: 2016-06-30 07:28 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch (13.04 KB, patch)
2016-06-29 12:59 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-wk2 (693.91 KB, application/zip)
2016-06-29 13:56 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2016-06-29 12:39:53 PDT
r199326 made it possible for HTMLMediaElement::originsInMediaCache, HTMLMediaElement::clearMediaCache and HTMLMediaElement::clearMediaCacheForOrigins to be called from multiple threads, but the media engine registration code isn't thread safe.
Comment 1 Eric Carlson 2016-06-29 12:40:57 PDT
<rdar://problem/27017656>
Comment 2 Eric Carlson 2016-06-29 12:59:56 PDT
Created attachment 282365 [details]
Proposed patch
Comment 3 Build Bot 2016-06-29 13:56:34 PDT
Comment on attachment 282365 [details]
Proposed patch

Attachment 282365 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1596164

New failing tests:
animations/multiple-backgrounds.html
Comment 4 Build Bot 2016-06-29 13:56:36 PDT
Created attachment 282371 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 5 Brent Fulgham 2016-06-29 16:10:03 PDT
Comment on attachment 282365 [details]
Proposed patch

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

Looks great! Would it be safer to initialize haveVector to false so that it's always in a known state?

> Source/WebCore/platform/graphics/MediaPlayer.cpp:189
> +    static bool haveVector;

Should this be initialized to false?
Comment 6 Brent Fulgham 2016-06-29 16:11:05 PDT
(In reply to comment #3)
> Comment on attachment 282365 [details]
> Proposed patch
> 
> Attachment 282365 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: http://webkit-queues.webkit.org/results/1596164
> 
> New failing tests:
> animations/multiple-backgrounds.html

I don't believe that this test failure can be attributed to these AVFoundation Media Engine changes, especially when that test does not use a media element.
Comment 7 Eric Carlson 2016-06-29 16:49:35 PDT
(In reply to comment #5)
> Comment on attachment 282365 [details]
> Proposed patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282365&action=review
> 
> Looks great! Would it be safer to initialize haveVector to false so that
> it's always in a known state?
> 
> > Source/WebCore/platform/graphics/MediaPlayer.cpp:189
> > +    static bool haveVector;
> 
> Should this be initialized to false?

It is a static, so the default value is false
Comment 8 Eric Carlson 2016-06-30 07:28:35 PDT
Committed r202678: https://trac.webkit.org/r202678