<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Share permission policy "web-share" and "self" as the allowlist"
   href="https://bugs.webkit.org/show_bug.cgi?id=214448#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Share permission policy "web-share" and "self" as the allowlist"
   href="https://bugs.webkit.org/show_bug.cgi?id=214448">bug 214448</a>
              from <span class="vcard"><a class="email" href="mailto:drousso@apple.com" title="Devin Rousso <drousso@apple.com>"> <span class="fn">Devin Rousso</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=437154&action=diff" name="attach_437154" title="Patch">attachment 437154</a> <a href="attachment.cgi?id=437154&action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=437154&action=review">https://bugs.webkit.org/attachment.cgi?id=437154&action=review</a>

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

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

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

Why not just use the `document` argument?

Also, EWS appears to be crashing in this function.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>