[Webkit-unassigned] [Bug 214448] Web Share permission policy "web-share" and "self" as the allowlist

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 2 12:26:07 PDT 2021


--- Comment #4 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 437154
  --> https://bugs.webkit.org/attachment.cgi?id=437154

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

> Source/WebCore/page/Navigator.cpp:131
> +    if (!frame || !frame->page() || !isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::WebShare, *frame->document(), LogFeaturePolicyFailure::Yes))

It's a bit unfortunate that this is here since it means that we'll check `isFeaturePolicyAllowedByDocumentAndAllOwners` twice when calling `Navigator::share`, but I suppose that's not the worst thing ��

NIT: I'd put this check on another line

> Source/WebCore/page/Navigator.cpp:148
> +    auto* frame = this->frame();
> +    if (!isFeaturePolicyAllowedByDocumentAndAllOwners(FeaturePolicy::Type::WebShare, *frame->document(), LogFeaturePolicyFailure::Yes)) {

Why not just use the `document` argument?

Also, EWS appears to be crashing in this function.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210902/8955c36c/attachment.htm>

More information about the webkit-unassigned mailing list