[webkit-dev] Fwd: Port WebKit to GNUstep
Konstantin Tokarev
annulen at yandex.ru
Fri May 12 08:21:49 PDT 2017
12.05.2017, 18:14, "Daniel Ferreira (theiostream)" <bnmvco at gmail.com>:
> On Fri, May 12, 2017 at 11:17 AM, Konstantin Tokarev <annulen at yandex.ru> wrote:
>> Choice of the correct MemoryPressureHandler implementation can be done
>> in your Platform*.cmake
>>
>> Note that you don't need to duplicate PlatformMac files and make changes,
>> it would be wiser to include(PlatformMac.cmake) and then make modifications
>> to variables.
>
> Yeah, checking for a Linux host and choosing which file to pick seems
> reasonable.
>
> But then it also makes sense to wrap the entire
> MemoryPressureHandlerCocoa.mm around an #if OS(DARWIN), no? We have a
> check for OS(LINUX) on the Linux counterpart.
>
> Which would then bring us to another question: if that's a Darwin
> thing, then shouldn't it be renamed to *Darwin.mm? This is even more
> evident for MemoryFootprintCocoa.mm, which uses only Mach APIs and no
> Cocoa APIs.
>
>> I think it's not appropriate to put OS(LINUX) stuff to *Mac files. However,
>> it might be ok to rename/move some files to reflect contents better, e.g.
>> mac/MainThreadMac.mm could become cocoa/MainThreadCocoa.mm
>> (but people working on Mac port may disagree)
>
> Yeah, I'd really like to hear feedback about that. At a glance that
> seems reasonable.
>
> Also, one more adjustment that might need OS-specific checks: XPCSPI.h
> relies on audit_token_t to be defined in the host OS.
You say you don't have XPC, so you don't need to deal with XPCSPI.h either
> I got around that with:
Bugzilla is the correct place for patches [1].
However, I guess #ifndef OS(DARWIN) inside darwin-specific header won't pass
review.
[1] https://webkit.org/contributing-code/
>
> Index: wtf/spi/darwin/XPCSPI.h
> ===================================================================
> --- wtf/spi/darwin/XPCSPI.h (revision 214620)
> +++ wtf/spi/darwin/XPCSPI.h (working copy)
> +#ifndef OS(DARWIN)
> +typedef struct {
> + unsigned int val[8];
> +} audit_token_t;
> +#endif
>
> #if OS_OBJECT_USE_OBJC
> OS_OBJECT_DECL(xpc_object);
> typedef xpc_object_t xpc_connection_t;
> ---
>
> -- Daniel.
--
Regards,
Konstantin
More information about the webkit-dev
mailing list