[webkit-changes] [WebKit/WebKit] 34863c: TestRunner.forceImmediateCompletion() hangs with s...
Kimmo Kinnunen
noreply at github.com
Wed Oct 23 01:15:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34863c0ae258b67d0817a9cbde6086426e0602e7
https://github.com/WebKit/WebKit/commit/34863c0ae258b67d0817a9cbde6086426e0602e7
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2024-10-23 (Wed, 23 Oct 2024)
Changed paths:
M LayoutTests/platform/mac-site-isolation/TestExpectations
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-async-expected.txt
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-async.html
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-sync-expected.txt
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-sync.html
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-sync-expected.txt
A LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-sync.html
A LayoutTests/wktr/notify-done-moment-dump-as-text-onload-async-expected.txt
A LayoutTests/wktr/notify-done-moment-dump-as-text-onload-async.html
A LayoutTests/wktr/notify-done-moment-dump-as-text-onload-sync-expected.txt
A LayoutTests/wktr/notify-done-moment-dump-as-text-onload-sync.html
A LayoutTests/wktr/notify-done-moment-dump-as-text-sync-expected.txt
A LayoutTests/wktr/notify-done-moment-dump-as-text-sync.html
M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
M Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
M Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
M Tools/WebKitTestRunner/TestInvocation.cpp
M Tools/WebKitTestRunner/TestInvocation.h
M Tools/WebKitTestRunner/TestOptions.h
Log Message:
-----------
TestRunner.forceImmediateCompletion() hangs with site isolation
https://bugs.webkit.org/show_bug.cgi?id=280403
rdar://136748844
Reviewed by Alex Christensen.
TestRunner.forceImmediateCompletion() would skip work because
it would try to run InjectedBundlePage::dump() in the calling WCP.
This would try to access main frame url, which is not available as
it is a remote frame.
Fix by resolving whether to dump or not by asking the WKTR process.
This is incorrect for forceImmediateCompletion(), as the semantics is
that the dump happens at that JS call stack immediately. This of
course is infeasible for site isolation, as the dump is global but
the processes cannot re-enter like that.
This is also incorrect for earlier notifyDone(). The notifyDone()
should dump immediately in case the load has happened.
(bug 268471 274211 at main)
Add tests for WKTR to explain the semantics. These semantics should
likely change, as they're incompatible with how site isolation works.
The re-entrant semantics has been causing mismatches also
without site isolation, so it may be beneficial to rethink these.
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-async-expected.txt: Added.
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-async.html: Added.
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-sync-expected.txt: Added.
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-onload-sync.html: Added.
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-sync-expected.txt: Added.
* LayoutTests/wktr/force-immediate-completion-moment-dump-as-text-sync.html: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-onload-async-expected.txt: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-onload-async.html: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-onload-sync-expected.txt: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-onload-sync.html: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-sync-expected.txt: Added.
* LayoutTests/wktr/notify-done-moment-dump-as-text-sync.html: Added.
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::notifyDone):
(WTR::TestRunner::forceImmediateCompletion):
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::resolveNotifyDone):
(WTR::TestInvocation::resolveForceImmediateCompletion):
* Tools/WebKitTestRunner/TestInvocation.h:
* Tools/WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::siteIsolationEnabled const):
Canonical link: https://commits.webkit.org/285592@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list