RESOLVED WONTFIX 261985
style checker gives error if makeUnique isn't used, but that isn't always a possibility
https://bugs.webkit.org/show_bug.cgi?id=261985
Summary style checker gives error if makeUnique isn't used, but that isn't always a p...
Jean-Yves Avenard [:jya]
Reported 2023-09-22 17:03:55 PDT
makeUnique requires that the object being allocated contains the type'webkitFastMalloced' added by the macro `WTF_MAKE_FAST_ALLOCATED` and others. When dealing with system frameworks or 3rd party libraries it is not always possible to use makeUnique to allocate an object, and only std::make_unique<T> will do. Yet, the style checker will give you a red-tick with errors like: `Use 'WTF::makeUnique<AudioFormatVorbisModeInfo>' instead of 'std::make_unique<AudioFormatVorbisModeInfo>'. [runtime/wtf_make_unique] [4]` I created bug 261033 for having makeUnique deals with all objects, however, one could argue that if makeUnique worked with all objects, it would give no advantages over std::make_unique.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-09-22 17:04:15 PDT
Jean-Yves Avenard [:jya]
Comment 2 2023-09-29 21:35:30 PDT
looks like we have to use makeUniqueWithoutFastMallocCheck
Note You need to log in before you can comment on or make changes to this bug.