[webkit-reviews] review granted: [Bug 137277] Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header : [Attachment 239035] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 1 13:54:56 PDT 2014


Alexey Proskuryakov <ap at webkit.org> has granted Daniel Bates
<dbates at webkit.org>'s request for review:
Bug 137277: Clean up: Move XPC forward declarations in JavaScriptCore to WTF
SPI wrapper header
https://bugs.webkit.org/show_bug.cgi?id=137277

Attachment 239035: Patch
https://bugs.webkit.org/attachment.cgi?id=239035&action=review

------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=239035&action=review


> Source/WTF/ChangeLog:14
> +	   * wtf/spi/cocoa/XPCSPI.h: Added.

It is annoying to have this in a cocoa directory, because XPC has nothing to do
with Cocoa. Maybe darwin?

> Source/WTF/wtf/spi/cocoa/XPCSPI.h:87
> +EXTERN_C CONST_ON_OR_AFTER_MAC_OS_X_VERSION_1090 struct _xpc_dictionary_s
_xpc_error_connection_invalid;

Where does EXTERN_C come from? I'd prefer a plain extern "C" - it's no more
verbose, but clearly less fragile.

> Source/WTF/wtf/spi/cocoa/XPCSPI.h:99
> +#if __BLOCKS__

We use "#ifdef __BLOCKS__" elsewhere in WebKit. Which is right?

> Source/WTF/wtf/spi/cocoa/XPCSPI.h:152
> +#if !defined(xpc_retain) && OS_OBJECT_USE_OBJC_RETAIN_RELEASE
> +#define xpc_retain(object) ({ xpc_object_t _o = (object);
_xpc_object_validate(_o); [_o retain]; })
> +#endif
> +
> +#if !defined(xpc_release) && OS_OBJECT_USE_OBJC_RETAIN_RELEASE
> +#define xpc_release(object) ({ xpc_object_t _o = (object);
_xpc_object_validate(_o); [_o release]; })
> +#endif

Does this compile in .cpp files?


More information about the webkit-reviews mailing list