Bug 181827

Summary: Update XPCSPI.h
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: Web Template FrameworkAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, thorton
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch
none
proposed patch
none
proposed patch
none
proposed patch none

Description Alexey Proskuryakov 2018-01-18 19:00:30 PST
rdar://problem/36393031
Comment 1 Alexey Proskuryakov 2018-01-18 20:18:24 PST
Created attachment 331702 [details]
proposed patch
Comment 2 EWS Watchlist 2018-01-18 20:19:58 PST
Attachment 331702 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:106:  xpc_array_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  The parameter name "applier" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  xpc_dictionary_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 3 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alexey Proskuryakov 2018-01-18 21:30:28 PST
Created attachment 331709 [details]
proposed patch
Comment 4 EWS Watchlist 2018-01-18 21:32:54 PST
Attachment 331709 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:106:  xpc_array_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  The parameter name "applier" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  xpc_dictionary_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 3 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Alexey Proskuryakov 2018-01-18 21:53:21 PST
Created attachment 331710 [details]
proposed patch
Comment 6 Alexey Proskuryakov 2018-01-18 21:54:24 PST
Created attachment 331711 [details]
proposed patch
Comment 7 EWS Watchlist 2018-01-18 21:56:22 PST
Attachment 331711 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:106:  xpc_array_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  The parameter name "applier" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WTF/wtf/spi/darwin/XPCSPI.h:107:  xpc_dictionary_apply is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 3 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Daniel Bates 2018-01-18 22:39:43 PST
Comment on attachment 331711 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=331711&action=review

I am assuming this only affects iOS as this patch conditioanlizes on it.

> Source/WTF/wtf/spi/darwin/XPCSPI.h:59
> +#define XPC_NOESCAPE __attribute__((__noescape__))

I am surprised this works on iOS. I guess clang accepts an attribute name with and without leading and trailing underscores. According to <https://clang.llvm.org/docs/AttributeReference.html#noescape-clang-noescape> clang recognizes __attribute__((noescape)).
Comment 9 Alexey Proskuryakov 2018-01-19 09:36:29 PST
> I am assuming this only affects iOS as this patch conditioanlizes on it.

Both are affected. This patch adds XPC_NOESCAPE to the prototype unconditionally, but also defines it to empty on platforms that don't have it, such as those using older Mac SDKs. Newer Mac SDKs have it.

> __attribute__((noescape))

Curious indeed. But it matches the definition in xpc/base.h.
Comment 10 WebKit Commit Bot 2018-01-19 10:09:27 PST
Comment on attachment 331711 [details]
proposed patch

Clearing flags on attachment: 331711

Committed r227212: <https://trac.webkit.org/changeset/227212>
Comment 11 WebKit Commit Bot 2018-01-19 10:09:29 PST
All reviewed patches have been landed.  Closing bug.