Skip to content

fix: Increase iframe unload timeout#3971

Merged
FrederikBolding merged 1 commit intomainfrom
fb/increase-iframe-unload-timeout
Apr 28, 2026
Merged

fix: Increase iframe unload timeout#3971
FrederikBolding merged 1 commit intomainfrom
fb/increase-iframe-unload-timeout

Conversation

@FrederikBolding
Copy link
Copy Markdown
Member

@FrederikBolding FrederikBolding commented Apr 28, 2026

Increase the iframe unload timeout significantly to prevent issues where the timeout would be too low and thus the workaround wouldn't be effective.

When testing this I've seen spikes up to 200ms, but mostly in the 10-50ms range. Though, we've decided to bump to a full second, since we don't expect to hit this often (if at all).

https://consensyssoftware.atlassian.net/browse/WPC-987


Note

Low Risk
Low risk: a single timeout constant is increased to reduce flaky iframe teardown; the main behavioral change is waiting longer before removing the iframe in edge cases.

Overview
Increases the withTimeout duration used during IframeExecutionService.terminateJob teardown (waiting for the about:blank load) from 10ms to 1_000ms before removing the iframe, making unload/cleanup more reliable under slower load events.

Reviewed by Cursor Bugbot for commit 747ccab. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (353d009) to head (747ccab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3971   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files         429      429           
  Lines       12363    12363           
  Branches     1942     1942           
=======================================
  Hits        12185    12185           
  Misses        178      178           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FrederikBolding FrederikBolding marked this pull request as ready for review April 28, 2026 12:11
@FrederikBolding FrederikBolding requested a review from a team as a code owner April 28, 2026 12:11
@FrederikBolding FrederikBolding added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 671bd18 Apr 28, 2026
132 checks passed
@FrederikBolding FrederikBolding deleted the fb/increase-iframe-unload-timeout branch April 28, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants