Bug 191948

Summary: [Cocoa] Make it easier to encode NSObjects for WebKit IPC
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, aestes, andersca, commit-queue, dino, ews-watchlist, koivisto, sam, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Andy Estes 2018-11-24 18:31:53 PST
[Cocoa] Make it easier to encode NSObjects
Comment 1 Andy Estes 2018-11-24 18:34:16 PST Comment hidden (obsolete)
Comment 2 Andy Estes 2018-11-24 18:36:55 PST Comment hidden (obsolete)
Comment 3 Andy Estes 2018-11-24 18:41:20 PST Comment hidden (obsolete)
Comment 4 EWS Watchlist 2018-11-24 18:45:13 PST Comment hidden (obsolete)
Comment 5 Andy Estes 2018-11-24 19:14:37 PST Comment hidden (obsolete)
Comment 6 Andy Estes 2018-11-24 20:48:07 PST Comment hidden (obsolete)
Comment 7 Andy Estes 2018-11-24 21:04:05 PST Comment hidden (obsolete)
Comment 8 Andy Estes 2018-11-26 10:17:08 PST
Created attachment 355649 [details]
Patch
Comment 9 Dean Jackson 2018-11-26 11:50:32 PST
Comment on attachment 355649 [details]
Patch

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

Cool patch!

> Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm:70
> +Payment::Payment() = default;

Why did you move this to the implementation?

> Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:57
> +    ASSERT([object isKindOfClass:allowedClasses[0]]);

Maybe ASSERT allowedClasses has entries?

> Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:58
> +    return { adoptNS((T *)object) };

Can you static_cast here?
Comment 10 Andy Estes 2018-11-26 11:58:37 PST
(In reply to Dean Jackson from comment #9)
> Comment on attachment 355649 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=355649&action=review
> 
> Cool patch!

Thanks for reviewing!

> 
> > Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm:70
> > +Payment::Payment() = default;
> 
> Why did you move this to the implementation?

check-webkit-style wanted me to (because it doesn't like inline member functions on exported classes).

> 
> > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:57
> > +    ASSERT([object isKindOfClass:allowedClasses[0]]);
> 
> Maybe ASSERT allowedClasses has entries?

Yes, good idea.

> 
> > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:58
> > +    return { adoptNS((T *)object) };
> 
> Can you static_cast here?

Ok.
Comment 11 Andy Estes 2018-11-26 12:06:24 PST
Created attachment 355664 [details]
Patch
Comment 12 WebKit Commit Bot 2018-11-26 13:13:55 PST
Comment on attachment 355664 [details]
Patch

Clearing flags on attachment: 355664

Committed r238515: <https://trac.webkit.org/changeset/238515>
Comment 13 WebKit Commit Bot 2018-11-26 13:13:57 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2018-11-26 13:15:45 PST
<rdar://problem/46254165>