[webkit-reviews] review granted: [Bug 238441] Implement ServiceWorker WindowClient.ancestorOrigins : [Attachment 455913] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 29 08:51:14 PDT 2022
Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 238441: Implement ServiceWorker WindowClient.ancestorOrigins
https://bugs.webkit.org/show_bug.cgi?id=238441
Attachment 455913: Patch
https://bugs.webkit.org/attachment.cgi?id=455913&action=review
--- Comment #4 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 455913
--> https://bugs.webkit.org/attachment.cgi?id=455913
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=455913&action=review
r=me but watch out before landing because I think I found a correctness bug.
> Source/WebCore/workers/service/ServiceWorkerClientData.cpp:62
> + return { identifier, type, frameType, url.isolatedCopy(),
lastNavigationWasAppInitiated, isVisible, isFocused, focusOrder,
ancestorOrigins };
I bet this should be `crossThreadCopy(ancestorOrigins)`, not `ancestorOrigins`.
> Source/WebCore/workers/service/ServiceWorkerClientData.cpp:80
> + while (frame) {
nit: I personally think this would look nicer as a for loop (see how it is
already implemented in Location::ancestorOrigins()).
> Source/WebCore/workers/service/ServiceWorkerWindowClient.h:46
> + bool focused() const { return data().isFocused; }
Not a fan of this change as it seems to go against coding style. Booleans
without prefixes don't look great.
More information about the webkit-reviews
mailing list