Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
7.69.0
Framework Version
3.2.47
Link to Sentry event
https://crosscountry-app.sentry.io/issues/4477507356/
SDK Setup
import {init} from "@sentry/vue";
...
init({
app: vue_app,
dsn: sentry_dsn,
release: "xxx"
});
Steps to Reproduce
Pass a frozen callback function to setTimeout
, using Safari v16.6:
function callback() {
console.log("Hello");
}
setTimeout(callback, 50); // OK
Object.freeze(callback);
setTimeout(callback, 50); // BOOM!
Stacktrace:
TypeError: Attempting to define property on object that is not extensible.
c — object.js:63
ze — helpers.js:129
(anonymous function) — trycatch.js:100
Global Code
In @sentry/utils/esm/object.js:
function markFunctionWrapped(wrapped, original) {
const proto = original.prototype || {};
wrapped.prototype = original.prototype = proto; // <-- this line throws the exception
addNonEnumerableProperty(wrapped, '__sentry_original__', original);
}
Expected Result
No exception.
Actual Result
An exception is thrown by Sentry.
Metadata
Metadata
Assignees
Type
Projects
Status
No status