[webkit-reviews] review granted: [Bug 206478] [Cocoa] Media mime types map should be created in the UI process : [Attachment 388167] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 20 11:38:43 PST 2020


Darin Adler <darin at apple.com> has granted Per Arne Vollan <pvollan at apple.com>'s
request for review:
Bug 206478: [Cocoa] Media mime types map should be created in the UI process
https://bugs.webkit.org/show_bug.cgi?id=206478

Attachment 388167: Patch

https://bugs.webkit.org/attachment.cgi?id=388167&action=review




--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 388167
  --> https://bugs.webkit.org/attachment.cgi?id=388167
Patch

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

Not sure what the Windows failure on EWS is about.

> Source/WebCore/platform/MIMETypeRegistry.cpp:285
> +    // A table of common media MIME types and file extentions used when a
platform's

Spelling error here. It’s extensions, not "extentions".

> Source/WebCore/platform/MIMETypeRegistry.cpp:287
> +    static NeverDestroyed<std::initializer_list<TypeExtensionPair>>
commonMediaTypes;

Should be able to use constexpr for this whole thing rather than needing code
to initialize it.

> Source/WebCore/platform/MIMETypeRegistry.cpp:290
> +    static std::once_flag onceFlag;
> +    std::call_once(

Surprised we need this. Is this called from multiple threads? If not then we
should just be able to use "= [] {" instead of all the call_once stuff as is
done in many other places in WebKit such as canAtttachAuthorShadowRoot,
hasEffectiveDisplayNoneForDisplayContents, etc.

> Source/WebCore/platform/MIMETypeRegistry.cpp:381
> +    static std::once_flag onceFlag;
> +    std::call_once(

Ditto.


More information about the webkit-reviews mailing list