decord/source/1062_applySourceContextToFrame.js

84 lines
2.9 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1062
2026-07-24 07:16:23 +00:00
// Function ID: 11357
2026-07-20 16:05:17 +00:00
// Name: applySourceContextToFrame
2026-07-23 10:11:24 +00:00
// Dependencies: [65, 794]
2026-07-20 16:05:17 +00:00
// Module 1062 (applySourceContextToFrame)
2026-07-23 10:11:24 +00:00
import _toConsumableArray from "_toConsumableArray";
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation";
2026-07-20 16:05:17 +00:00
function applySourceContextToFrame(filename) {
if (filename.filename === arg2) {
if (filename.lineno) {
if (arg1.length) {
2026-07-23 10:11:24 +00:00
require(794) /* registerSpanErrorInstrumentation */.addContextToFrame(arg1, filename, arg3);
const obj = require(794) /* registerSpanErrorInstrumentation */;
2026-07-20 16:05:17 +00:00
}
}
}
return filename;
}
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
export { applySourceContextToFrame };
2026-07-23 10:11:24 +00:00
export const contextLinesIntegration = registerSpanErrorInstrumentation.defineIntegration(function _contextLinesIntegration() {
2026-07-20 16:05:17 +00:00
if (arguments.length > 0) {
if (undefined !== arguments[0]) {
let first = arguments[0];
}
let num = 7;
if (null != first.frameContextLines) {
num = first.frameContextLines;
}
2026-07-23 10:11:24 +00:00
let obj = {
2026-07-20 16:05:17 +00:00
name: "ContextLines",
processEvent(exception) {
2026-07-23 10:11:24 +00:00
(function addSourceContext(exception, arg1) {
let closure_0 = arg1;
const _document = num(outer2_1[1]).GLOBAL_OBJ.document;
let _location = num(outer2_1[1]).GLOBAL_OBJ.location;
2026-07-20 16:05:17 +00:00
if (_location) {
2026-07-23 10:11:24 +00:00
_location = num(outer2_1[1]).stripUrlQueryAndFragment(num(outer2_1[1]).GLOBAL_OBJ.location.href);
const obj = num(outer2_1[1]);
2026-07-20 16:05:17 +00:00
}
if (_document) {
if (_location) {
exception = exception.exception;
let values;
if (null != exception) {
values = exception.values;
}
if (null != values) {
if (values.length) {
if (_document.documentElement.innerHTML) {
2026-07-23 10:11:24 +00:00
const items = ["<!DOCTYPE html>", "<html>"];
let closure_2 = items.concat(outer2_2(str.split("\n")), ["</html>"]);
2026-07-20 16:05:17 +00:00
const item = values.forEach((stacktrace) => {
stacktrace = stacktrace.stacktrace;
if (tmp) {
const frames = stacktrace.frames;
stacktrace.frames = frames.map((arg0) => {
2026-07-23 10:11:24 +00:00
outer4_3(arg0, outer1_2, outer1_1, outer1_0);
2026-07-20 16:05:17 +00:00
return arg0;
});
}
});
return exception;
} else {
return exception;
}
}
}
return exception;
}
}
return exception;
2026-07-23 10:11:24 +00:00
})(exception, num);
2026-07-20 16:05:17 +00:00
return exception;
}
};
return obj;
}
first = {};
});