Check the existence of the frame in Document::hasFrameSpecificStorageAccess() and...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2019 23:13:58 +0000 (23:13 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2019 23:13:58 +0000 (23:13 +0000)
commit7585e760eedc2f90bd6429eea34e4df58fc56ee8
treec69a2ec7ad70356c9bfaff80a91ab18c733a8a59
parentdb2df9e9a6f454f356b8074bdcfe0e6ec645c407
Check the existence of the frame in Document::hasFrameSpecificStorageAccess() and Document::setHasFrameSpecificStorageAccess()
https://bugs.webkit.org/show_bug.cgi?id=194777
<rdar://problem/47731945>

Reviewed by Geoffrey Garen and Chris Dumez.

Source/WebCore:

Test: http/tests/storageAccess/remove-requesting-iframe.html

* dom/Document.cpp:
(WebCore::Document::hasFrameSpecificStorageAccess const):
    Now checks for the existence of the frame.
(WebCore::Document::setHasFrameSpecificStorageAccess):
    Now checks for the existence of the frame.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
    Now checks that the session ID is valid.

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::logUserInteraction):
   Now returns early if the incoming session ID is invalid.
   Added an ASSERT to help us find other call sites passing invalid session IDs.

LayoutTests:

* http/tests/storageAccess/remove-requesting-iframe-expected.txt: Added.
* http/tests/storageAccess/remove-requesting-iframe.html: Added.
* http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/storageAccess/remove-requesting-iframe-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/storageAccess/remove-requesting-iframe.html [new file with mode: 0644]
LayoutTests/http/tests/storageAccess/resources/request-storage-access-and-immediately-postmessage-iframe.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/loader/ResourceLoadObserver.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp