Skip to content

fix(v10/browser): Release the XHR virtualError once the request completed - #24307

Merged
logaretm merged 1 commit into
v10from
awad/v10-xhr-virtual-error-release
Sep 10, 2026
Merged

fix(v10/browser): Release the XHR virtualError once the request completed#24307
logaretm merged 1 commit into
v10from
awad/v10-xhr-virtual-error-release

Conversation

@logaretm

@logaretm logaretm commented Sep 10, 2026

Copy link
Copy Markdown
Member

Backport of: #24277

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.77 kB added added
@sentry/browser - with treeshaking flags 26.22 kB added added
@sentry/browser (incl. Tracing) 46.63 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.43 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.39 kB added added
@sentry/browser (incl. Tracing, Replay) 85.89 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.52 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.62 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.25 kB added added
@sentry/browser (incl. Feedback) 44.95 kB added added
@sentry/browser (incl. sendFeedback) 32.57 kB added added
@sentry/browser (incl. FeedbackAsync) 37.71 kB added added
@sentry/browser (incl. Metrics) 28.88 kB added added
@sentry/browser (incl. Logs) 29.1 kB added added
@sentry/browser (incl. Metrics & Logs) 29.8 kB added added
@sentry/react 29.59 kB added added
@sentry/react (incl. Tracing) 48.9 kB added added
@sentry/vue 33.21 kB added added
@sentry/vue (incl. Tracing) 48.62 kB added added
@sentry/svelte 27.81 kB added added
CDN Bundle 30.18 kB added added
CDN Bundle (incl. Tracing) 48.6 kB added added
CDN Bundle (incl. Logs, Metrics) 31.76 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.92 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71.04 kB added added
CDN Bundle (incl. Tracing, Replay) 86.14 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.44 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.91 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.21 kB added added
CDN Bundle - uncompressed 89.91 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.72 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.62 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.7 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.45 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.99 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.72 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.68 kB added added
@sentry/nextjs (client) 51.48 kB added added
@sentry/sveltekit (client) 47.07 kB added added
@sentry/core/server 80.8 kB added added
@sentry/core/browser 66.95 kB added added
@sentry/node-core 63.32 kB added added
@sentry/node 126.02 kB added added
@sentry/node (incl. diagnostics channel injection) 170.11 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node/light 51.46 kB added added
@sentry/node - without tracing 75 kB added added
@sentry/aws-serverless 84.26 kB added added
@sentry/cloudflare (withSentry) - minified 202.76 kB added added
@sentry/cloudflare (withSentry) 499.38 kB added added

@logaretm
logaretm marked this pull request as ready for review September 10, 2026 15:24
@logaretm
logaretm requested a review from a team as a code owner September 10, 2026 15:24
@logaretm
logaretm requested review from msonnb and mydea and removed request for a team September 10, 2026 15:24

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 50233f0. Configure here.


expect(inFlightRequest).toBeDefined();
expect(firstRequest?.deref()).toBeUndefined();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retention test misses proxy leak path

Medium Severity

The new regression test only drives the addEventListener branch, where removeEventListener already drops the handler that closed over virtualError. The leak this fix targets is the onreadystatechange proxy keeping that closure—and the prior request—alive. This test can pass without virtualError = undefined and may not lock in the fix. Flagged because the Testing Conventions in the review rules require a fix PR's test to fail without the change and pass with it.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 50233f0. Configure here.

@logaretm
logaretm merged commit d74afa4 into v10 Sep 10, 2026
415 of 417 checks passed
@logaretm
logaretm deleted the awad/v10-xhr-virtual-error-release branch September 10, 2026 16: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