decord/source/1086_applySourceContextToFrame.js

87 lines
2.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1086
// Function ID: 1087
// Name: applySourceContextToFrame
// Dependencies: [817]
// Exports: applySourceContextToFrame
// Module 1086 (applySourceContextToFrame)
2026-08-24 06:08:38 +00:00
import registerSpanErrorInstrumentation from "registerSpanErrorInstrumentation" /* 817 */;
2026-07-29 08:29:29 +00:00
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
export const applySourceContextToFrame = function applySourceContextToFrame(filename) {
if (filename.filename === arg2) {
if (filename.lineno) {
if (arg1.length) {
2026-08-24 06:08:38 +00:00
registerSpanErrorInstrumentation.addContextToFrame(arg1, filename, arg3);
const obj = registerSpanErrorInstrumentation;
2026-07-29 08:29:29 +00:00
}
}
}
return filename;
};
export const contextLinesIntegration = registerSpanErrorInstrumentation.defineIntegration(() => {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let num;
num = 7;
if (null != obj.frameContextLines) {
num = obj.frameContextLines;
}
obj = {
name: "ContextLines",
processEvent(exception) {
2026-08-24 06:08:38 +00:00
const _document = num(closure_1_1[0]).GLOBAL_OBJ.document;
let _location = num(closure_1_1[0]).GLOBAL_OBJ.location;
2026-07-29 08:29:29 +00:00
if (_location) {
_location = tmp(tmp2[0]).stripUrlQueryAndFragment(tmp(tmp2[0]).GLOBAL_OBJ.location.href);
const tmpResult = tmp(tmp2[0]);
}
if (_document) {
if (_location) {
exception = exception.exception;
let values;
if (exception != null) {
values = exception.values;
}
let length;
if (values != null) {
length = values.length;
}
if (length) {
if (_document.documentElement.innerHTML) {
const items = ["<!DOCTYPE html>", "<html>"];
items[HermesBuiltin.arraySpread(str.split("\n"), 2)] = "</html>";
const item = values.forEach((stacktrace) => {
stacktrace = stacktrace.stacktrace;
let frames;
if (stacktrace != null) {
frames = stacktrace.frames;
}
if (frames) {
const frames1 = stacktrace.frames;
stacktrace.frames = frames1.map((filename) => {
if (filename.filename === closure_1) {
if (filename.lineno) {
if (arr.length) {
2026-08-24 06:08:38 +00:00
closure_1_0(closure_1_1[0]).addContextToFrame(arr, filename, tmp);
const obj = closure_1_0(closure_1_1[0]);
2026-07-29 08:29:29 +00:00
}
}
}
return filename;
});
}
});
}
}
}
}
return exception;
}
};
return obj;
});