[webkit-changes] [WebKit/WebKit] 99c5b7: Store correct committed WebPage origin

Matthew Finkel noreply at github.com
Thu Sep 7 10:48:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99c5b714ebf06956d737ac12c1208852201d9078
      https://github.com/WebKit/WebKit/commit/99c5b714ebf06956d737ac12c1208852201d9078
  Author: Matthew Finkel <sysrqb at apple.com>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm

  Log Message:
  -----------
  Store correct committed WebPage origin
https://bugs.webkit.org/show_bug.cgi?id=261241
rdar://problem/115082690

Reviewed by Alex Christensen.

In 266870 at main I began caching the committed page's SecurityOriginData, however
I copied the frame's origin at the wrong point in time. In that patch, I used
the Navigation's destinationFrameSecurityOrigin. That captured the frame's
SecurityOriginData when we began handling the navigation request. We actually
want the frame's SecurityOriginData at the time we committed the load ("now").
Therefore we should use the SecurityOriginData from the FrameInfo, instead.

This is still covered by existing tests, but this problem wasn't noticed until
I began testing enabling a new feature that relies on this informatin being
correct.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Download.mm:

Canonical link: https://commits.webkit.org/267739@main




More information about the webkit-changes mailing list