Bug 191948 - [Cocoa] Make it easier to encode NSObjects for WebKit IPC
Summary: [Cocoa] Make it easier to encode NSObjects for WebKit IPC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-24 18:31 PST by Andy Estes
Modified: 2018-11-26 13:15 PST (History)
11 users (show)

See Also:


Attachments
Patch (46.42 KB, patch)
2018-11-24 18:34 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (46.33 KB, patch)
2018-11-24 18:36 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (46.06 KB, patch)
2018-11-24 18:41 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (49.96 KB, patch)
2018-11-24 19:14 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (49.94 KB, patch)
2018-11-24 20:48 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (49.32 KB, patch)
2018-11-24 21:04 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (50.88 KB, patch)
2018-11-26 10:17 PST, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (51.72 KB, patch)
2018-11-26 12:06 PST, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>