[webkit-dev] Objective-C code in libwebrtc already assuming ARC?

youenn fablet youennf at gmail.com
Wed Jun 6 09:38:18 PDT 2018

Dave suggested the same approach in
ARC should be enabled for the whole libwebrtc project in WebKit ToT.
Le mer. 6 juin 2018 à 09:28, Darin Adler <darin at apple.com> a écrit :

> Hi folks.
> As some of you have probably noticed, I’ve begun making changes with the
> goal of preparing us to move most Objective-C code in WebKit to ARC. In
> doing so, I have been exploring the existing code in the tree and the
> various projects in our source tree. The nine projects with configuration
> files that I have looked at are:
> JavaScriptCore, ANGLE, libwebrtc, WebCore, WebCore/PAL, WebInspectorUI,
> WebKit, WebKitLegacy/mac, and bmalloc.
> These projects all currently have CLANG_ENABLE_OBJC_WEAK in their
> configuration files, and moving them to ARC involves adding
> CLANG_ENABLE_OBJC_ARC, and then doing lots of other work to ensure the
> projects still work properly, including possibly turning off ARC for
> certain source files that are best keep working with manual retain and
> release. Some of them such as ANGLE, bmalloc, and WebInspectorUI, have no
> Objective-C code, or almost none, so they should be easy to “convert".
> But when investigating libwebrtc I discovered a non-tribal amount of code
> that already seems to assume ARC but to be compiled with ARC disabled. One
> example is these two methods:
> -[RTCVideoEncoderFactoryH264 supportedCodecs]
> -[RTCVideoDecoderFactoryH264 supportedCodecs]
> If we are compiling this without ARC and executing calls to these methods,
> then I think we will have storage leaks.
> As far as I can tell, the only source file in libwebrtc that is currently
> compiled with ARC enabled is voice_processing_audio_unit.mm but perhaps I
> am overlooking something.
> Do we need to turn ARC on for the entire libwebrtc project?
> — Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20180606/97458ac7/attachment.html>

More information about the webkit-dev mailing list