Skip to content

Conversation

@FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Jan 9, 2026

Ensure the load listener for the iframe is removed after the promise resolves. Found while investigating a memory leak, but does not fix it.


Note

Ensures the iframe load handler is one-time and self-cleaning.

  • Updates iframe.ts to use addEventListener('load', handler, { once: true }), so the listener automatically removes itself after resolving/rejecting, preventing duplicate fires and lingering listeners

Written by Cursor Bugbot for commit 56dce3b. This will update automatically on new commits. Configure here.

@FrederikBolding FrederikBolding requested a review from a team as a code owner January 9, 2026 14:16
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.34%. Comparing base (6653139) to head (56dce3b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/snaps-utils/src/iframe.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3797   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         422      422           
  Lines       12059    12060    +1     
  Branches     1872     1872           
=======================================
+ Hits        11859    11860    +1     
  Misses        200      200           

☔ 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 added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit 2b60768 Jan 9, 2026
126 of 127 checks passed
@FrederikBolding FrederikBolding deleted the fb/remove-iframe-event-listener branch January 9, 2026 14:29
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.

3 participants