Summary: | Make PreviewConverterProvider not modify the SharedBuffer once returned | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||||||||||
Component: | WebCore Misc. | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | alecflett, beidson, benjamin, calvaris, cdumez, cgarcia, changseok, eric.carlson, esprehn+autocc, ews-watchlist, galpeter, glenn, gustavo, gyuyoung.kim, hi, hta, japhet, jbedard, jer.noble, joepeck, jsbell, kangil.han, keith_miller, macpherson, mark.lam, menard, mifenton, mmaxfield, msaboff, pangle, philipj, pnormand, rniwa, saam, sergio, tommyw, tzagallo, vjaquez, webkit-bug-importer, youennf | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
Version: | Other | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Bug Depends on: | |||||||||||||||||||
Bug Blocks: | 233922 | ||||||||||||||||||
Attachments: |
|
Description
Jean-Yves Avenard [:jya]
2021-12-07 04:07:41 PST
Created attachment 446155 [details]
Patch for EWS
Created attachment 446156 [details]
Patch
Created attachment 446266 [details]
Patch
Created attachment 446267 [details]
Patch for EWS
Created attachment 446537 [details]
Patch
rebase
Created attachment 446538 [details]
Patch for EWS
Created attachment 447121 [details]
Patch
rebase
Comment on attachment 447121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447121&action=review > Source/WebCore/loader/ios/LegacyPreviewLoader.mm:230 > + completionHandler(m_originalData.copy()); Unrelated but why do we need a CompletionHandler if we are synchronously returning. > Source/WebCore/platform/PreviewConverter.cpp:85 > + appendFromBuffer(WTFMove(buffer)); So we can never go to didFailUpdating, even if buffer is of size 0? Should we move from const FragmentedSharedBuffer* to RefPtr<FragmentedSharedBuffer>&&? Comment on attachment 447121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447121&action=review >> Source/WebCore/platform/PreviewConverter.cpp:85 >> + appendFromBuffer(WTFMove(buffer)); > > So we can never go to didFailUpdating, even if buffer is of size 0? > Should we move from const FragmentedSharedBuffer* to RefPtr<FragmentedSharedBuffer>&&? Buffer previously was a pointer and could never have been null (the SharedBuffer was always created in the constructor) I made it a Ref<FragmentedaharedBuffer>&& There’s been no logic change Committed r287053 (245249@main): <https://commits.webkit.org/245249@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447121 [details]. |