2026-07-29 08:29:29 +00:00
|
|
|
// Module ID: 820
|
|
|
|
|
// Function ID: 821
|
|
|
|
|
// Name: unwrapScopeFromWeakRef
|
|
|
|
|
// Dependencies: [821, 822]
|
|
|
|
|
|
|
|
|
|
// Module 820 (unwrapScopeFromWeakRef)
|
2026-08-24 06:08:38 +00:00
|
|
|
import addNonEnumerableProperty from "addNonEnumerableProperty" /* 822 */;
|
|
|
|
|
|
|
|
|
|
require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
const dependencyMap = arg6;
|
2026-08-04 21:03:28 +00:00
|
|
|
function unwrapScopeFromWeakRef(obj) {
|
|
|
|
|
if (obj) {
|
|
|
|
|
if (typeof obj === "object") {
|
|
|
|
|
if ("deref" in obj) {
|
|
|
|
|
if (typeof obj.deref === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
try {
|
2026-08-04 21:03:28 +00:00
|
|
|
return obj.deref();
|
2026-07-29 08:29:29 +00:00
|
|
|
} catch (err) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-04 21:03:28 +00:00
|
|
|
return obj;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Object.defineProperty(arg5, Symbol.toStringTag, { value: "Module" });
|
|
|
|
|
const _sentryScope = "_sentryScope";
|
|
|
|
|
const _sentryIsolationScope = "_sentryIsolationScope";
|
|
|
|
|
arg5.getCapturedScopesOnSpan = function getCapturedScopesOnSpan(scope) {
|
|
|
|
|
return { scope: scope[_sentryScope], isolationScope: unwrapScopeFromWeakRef(scope[_sentryIsolationScope]) };
|
|
|
|
|
};
|
|
|
|
|
arg5.setCapturedScopesOnSpan = function setCapturedScopesOnSpan(arg0, arg1, arg2) {
|
|
|
|
|
if (arg0) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = addNonEnumerableProperty.addNonEnumerableProperty(arg0, _sentryIsolationScope, (function wrapScopeWithWeakRef(arg0) {
|
2026-07-29 08:29:29 +00:00
|
|
|
try {
|
|
|
|
|
let _WeakRef = callback(table[0]).GLOBAL_OBJ.WeakRef;
|
2026-08-04 21:03:28 +00:00
|
|
|
if (typeof _WeakRef === "function") {
|
2026-07-29 08:29:29 +00:00
|
|
|
_WeakRef = new _WeakRef(arg0);
|
|
|
|
|
return _WeakRef;
|
|
|
|
|
} else {
|
|
|
|
|
return arg0;
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
}
|
|
|
|
|
})(arg2));
|
2026-08-24 06:08:38 +00:00
|
|
|
const obj = addNonEnumerableProperty;
|
|
|
|
|
const result1 = addNonEnumerableProperty.addNonEnumerableProperty(arg0, _sentryScope, arg1);
|
|
|
|
|
const obj2 = addNonEnumerableProperty;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
};
|