Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Do not throw when trying to fill readonly properties #14402

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 21, 2024

This PR adds a guard to avoid us throwing if we try to fill a readonly property on an object.

Generally speaking this should not work, but it does not hurt us to be defensive here and try-catch this to avoid breaking users apps.

Fixes #14368

@mydea mydea requested review from lforst and chargome November 21, 2024 09:46
@mydea mydea self-assigned this Nov 21, 2024
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.88 KB +0.09% +19 B 🔺
@sentry/browser - with treeshaking flags 21.57 KB +0.01% +2 B 🔺
@sentry/browser (incl. Tracing) 35.43 KB +0.06% +20 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.11 KB +0.03% +20 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.42 KB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.41 KB +0.03% +20 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.89 KB +0.03% +19 B 🔺
@sentry/browser (incl. Feedback) 39.62 KB +0.04% +14 B 🔺
@sentry/browser (incl. sendFeedback) 27.51 KB +0.07% +19 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.32 KB +0.04% +13 B 🔺
@sentry/react 25.58 KB +0.07% +18 B 🔺
@sentry/react (incl. Tracing) 38.29 KB +0.06% +20 B 🔺
@sentry/vue 27.04 KB +0.07% +17 B 🔺
@sentry/vue (incl. Tracing) 37.24 KB +0.05% +19 B 🔺
@sentry/svelte 23.03 KB +0.1% +23 B 🔺
CDN Bundle 24.04 KB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing) 36.99 KB - -
CDN Bundle (incl. Tracing, Replay) 71.7 KB +0.01% +2 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 77.05 KB +0.01% +1 B 🔺
CDN Bundle - uncompressed 70.9 KB +0.03% +15 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 110.12 KB +0.02% +15 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.65 KB +0.01% +15 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.87 KB +0.01% +15 B 🔺
@sentry/nextjs (client) 38.39 KB +0.04% +14 B 🔺
@sentry/sveltekit (client) 35.94 KB +0.07% +25 B 🔺
@sentry/node 134.48 KB +0.03% +39 B 🔺
@sentry/node - without tracing 96.3 KB +0.03% +23 B 🔺
@sentry/aws-serverless 106.55 KB +0.04% +38 B 🔺

View base workflow run

Copy link

codecov bot commented Nov 21, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
651 1 650 30
View the top 1 failed tests by shortest run time
client-app-routing-instrumentation.test.ts Creates a navigation transaction for app router routes
Stack Traces | 30s run time
client-app-routing-instrumentation.test.ts:19:5 Creates a navigation transaction for app router routes

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

👍

@mydea mydea merged commit 0c0f8c6 into develop Nov 21, 2024
154 of 155 checks passed
@mydea mydea deleted the fn/guard-fill branch November 21, 2024 11:21
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.

Cannot assign to read only property 'debug' of object '#<Object>'
2 participants