WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
234054
Use thread safe initialization for statics in ComplexTextController::collectComplexTextRunsForCharacters
https://bugs.webkit.org/show_bug.cgi?id=234054
Summary
Use thread safe initialization for statics in ComplexTextController::collectC...
Cameron McCormack (:heycam)
Reported
2021-12-08 18:27:41 PST
Use thread safe initialization for statics in ComplexTextController::collectComplexTextRunsForCharacters
Attachments
Patch
(5.14 KB, patch)
2021-12-08 18:29 PST
,
Cameron McCormack (:heycam)
darin
: review+
Details
Formatted Diff
Diff
Patch
(4.32 KB, patch)
2022-07-20 14:42 PDT
,
Matt Woodrow
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Cameron McCormack (:heycam)
Comment 1
2021-12-08 18:29:09 PST
Created
attachment 446474
[details]
Patch
Darin Adler
Comment 2
2021-12-08 19:03:50 PST
Comment on
attachment 446474
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=446474&action=review
> Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:163 > +static CFDictionaryRef ltrTypesetterOptions() > +{ > + static LazyNeverDestroyed<RetainPtr<CFDictionaryRef>> options; > + static std::once_flag onceFlag; > + std::call_once(onceFlag, [&] { > + options.construct(makeTypesetterOptions(true)); > + }); > + return options.get().get(); > +} > + > +static CFDictionaryRef rtlTypesetterOptions() > +{ > + static LazyNeverDestroyed<RetainPtr<CFDictionaryRef>> options; > + static std::once_flag onceFlag; > + std::call_once(onceFlag, [&] { > + options.construct(makeTypesetterOptions(false)); > + }); > + return options.get().get(); > +}
Use a template function with an int or bool argument so we don’t have to repeat the code twice?
> Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm:205 > + RetainPtr<CTTypesetterRef> typesetter = adoptCF(CTTypesetterCreateWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions() : rtlTypesetterOptions()));
auto is better here
Cameron McCormack (:heycam)
Comment 3
2021-12-09 23:18:23 PST
This patch too won't be needed if
bug 234102
succeeds.
Radar WebKit Bug Importer
Comment 4
2021-12-15 18:28:14 PST
<
rdar://problem/86553179
>
Matt Woodrow
Comment 5
2022-07-20 14:42:02 PDT
Created
attachment 461057
[details]
Patch
EWS
Comment 6
2022-07-20 17:38:31 PDT
Committed
252669@main
(01711aa5bc47): <
https://commits.webkit.org/252669@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 461057
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug