MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / markFunctionWrapped

Function markFunctionWrapped

packages/core/src/utils/object.ts:75–81  ·  view source on GitHub ↗
(wrapped: WrappedFunction, original: WrappedFunction)

Source from the content-addressed store, hash-verified

73 * @param original the original function that gets wrapped
74 */
75export function markFunctionWrapped(wrapped: WrappedFunction, original: WrappedFunction): void {
76 try {
77 const proto = original.prototype || {};
78 wrapped.prototype = original.prototype = proto;
79 addNonEnumerableProperty(wrapped, '__sentry_original__', original);
80 } catch {} // eslint-disable-line no-empty
81}
82
83/**
84 * Wrap a method on an object by name, only if it is not already wrapped.

Callers 9

object.test.tsFile · 0.90
patchLayerFunction · 0.90
console.test.tsFile · 0.90
patchWithDefinePropertyFunction · 0.90
wrapFunction · 0.85
fillFunction · 0.85
wrapMethodFunction · 0.85

Calls 1

addNonEnumerablePropertyFunction · 0.85

Tested by

no test coverage detected