[webkit-reviews] review granted: [Bug 178839] messageEvent.source can also be a ServiceWorker : [Attachment 324933] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 25 19:21:57 PDT 2017
Brady Eidson <beidson at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 178839: messageEvent.source can also be a ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=178839
Attachment 324933: Patch
https://bugs.webkit.org/attachment.cgi?id=324933&action=review
--- Comment #2 from Brady Eidson <beidson at apple.com> ---
Comment on attachment 324933
--> https://bugs.webkit.org/attachment.cgi?id=324933
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=324933&action=review
> Source/WebCore/dom/MessageEvent.h:46
> -using MessageEventSource = Variant<RefPtr<DOMWindow>, RefPtr<MessagePort>>;
> +using MessageEventSource = Variant<RefPtr<DOMWindow>, RefPtr<MessagePort>
> +#if ENABLE(SERVICE_WORKER)
> + , RefPtr<ServiceWorker>
> +#endif
> + >;
This is gross. I'd almost prefer a single line duplicating all 3 possibilities
for the #if ENABLE() case.
> Source/WebCore/dom/MessageEvent.idl:33
> +#if defined(ENABLE_SERVICE_WORKER) && ENABLE_SERVICE_WORKER
> +typedef (DOMWindow or MessagePort or ServiceWorker) MessageEventSource;
> +#else
> +typedef (DOMWindow or MessagePort) MessageEventSource;
> +#endif
Like this is what I was alluding to up there ^^^
More information about the webkit-reviews
mailing list