Summary: | [WTF] Make MediaTime constructor constexpr | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alicia Boya García <aboya> | ||||||
Component: | Web Template Framework | Assignee: | Alicia Boya García <aboya> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aperez, benjamin, cdumez, cmarcelo, commit-queue, dbates, ddkilzer, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Alicia Boya García
2020-01-09 14:13:36 PST
Created attachment 387286 [details]
Patch
Created attachment 387527 [details]
Patch
Comment on attachment 387527 [details]
Patch
Nice one :)
The commit-queue encountered the following flaky tests while processing attachment 387527 [details]: editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org) The commit-queue is continuing to process your patch. Comment on attachment 387527 [details] Patch Clearing flags on attachment: 387527 Committed r254509: <https://trac.webkit.org/changeset/254509> All reviewed patches have been landed. Closing bug. Comment on attachment 387527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387527&action=review > Source/WTF/ChangeLog:15 > + It did not eliminate the call to the MediaTime constructor on runtime > + though. This wasn't a problem for static variables inside functions, > + as the compiler adds a guard variable to call the constructor the > + first time the function is called. Note that Apple ports DISABLE thread-safe static variable initialization for performance reasons, so this statement may not be true for all ports. This Xcode variable is turned into a compiler switch that disables them: GCC_THREADSAFE_STATICS = NO; Comment on attachment 387527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387527&action=review >> Source/WTF/ChangeLog:15 >> + first time the function is called. > > Note that Apple ports DISABLE thread-safe static variable initialization for performance reasons, so this statement may not be true for all ports. > > This Xcode variable is turned into a compiler switch that disables them: > > GCC_THREADSAFE_STATICS = NO; Well, the guard variable would (if it were not for this patch) still be there, as the initialization would still be delayed to runtime... it would just be checked and set in a non thread-safe way. |