Bug 315664
| Summary: | [Site Isolation] iframe monitor tests are failing | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Anthony Tarbinian <a.tarbinian> |
| Component: | WebKit Process Model | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | nham, webkit-bug-importer |
| Priority: | P1 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Anthony Tarbinian
The following tests are failing with site isolation:
http/tests/iframe-monitor/eligibility.html
http/tests/iframe-monitor/iframe-unload.html
http/tests/iframe-monitor/throttler.html
http/tests/iframe-monitor/workers/service-worker-not-count-twice.html
http/tests/iframe-monitor/workers/service-worker.html
http/tests/iframe-monitor/workers/shared-worker.html
Note that this doesn't cover http/tests/iframe-memory-monitor/media-video-autoplay-in-frames.html
These 6 tests in http/tests/iframe-monitor/ timed out under
--site-isolation. The tests use a WebKit feature
which enforces a resource usage threshold for iframes. When an
iframe goes over the resource usage threshold, the iframe is killed
by getting swapped out with a gray placeholder iframe that reads:
"this frame is hidden".
The first bug was that WebLocalFrameLoaderClient::didExceedNetworkUsageThreshold
assumes that the main frame is a local frame. This isn't true with
site isolation. It uses the local main frame to grab the URL of the
main frame and send it via the Messages::NetworkConnectionToWebProcess::ShouldOffloadIFrameForHost
IPC message.
With site isolation enabled, the main frame's document wasn't available
and didExceedNetworkUsageThreshold returned early, never sending the
NetworkConnectionToWebProcess::ShouldOffloadIFrameForHost IPC message.
The second bug was that LocalFrame::showResourceMonitoringError
tried to use ownerElement() to set the srcdoc of the iframe.
With site isolation enabled, the owner element was in a different process
and was nullptr.
The third bug, involves settings on internals.* to not be propagated
to all processes which is problematic for site isolation.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/178052024>
Anthony Tarbinian
Pull request: https://github.com/WebKit/WebKit/pull/65806
EWS
Committed 314057@main (270a9fa5f162): <https://commits.webkit.org/314057@main>
Reviewed commits have been landed. Closing PR #65806 and removing active labels.