Files
discord-decomp/_bundle/Module6486.js
T
2026-11-01 12:12:55 +02:00

43 lines
1.2 KiB
JavaScript

// Metro module 6486 (f6487).
import { dropUndefinedKeys } from "./addNonEnumerableProperty_6374";
import { UNKNOWN_FUNCTION } from "./createStackParser_6371";
import { filenameIsInApp } from "./Module6484";
export function callFrameToStackFrame(a0, a1, a2) {
const filename = a1 ? a1.replace(/^file:\/\//, "") : void 0;
const colno = a0.location.columnNumber ? a0.location.columnNumber + 1 : void 0;
const lineno = a0.location.lineNumber ? a0.location.lineNumber + 1 : void 0;
return dropUndefinedKeys({
filename,
module: a2(filename),
function: a0.functionName || UNKNOWN_FUNCTION,
colno,
lineno,
in_app: filename ? filenameIsInApp(filename) : void 0
});
}
export function watchdogTimer(a0, c15770_0, c15770_1, c15770_2) {
let c15770_3 = a0();
let c15770_4 = false;
let c15770_5 = true;
setInterval(() => {
const timeMs = c15770_3.getTimeMs();
if (c15770_4 === false && timeMs > c15770_0 + c15770_1) {
c15770_4 = true;
if (c15770_5) {
c15770_2();
}
}
if (timeMs < c15770_0 + c15770_1) {
c15770_4 = false;
}
}, 20);
return {
poll: () => {
c15770_3.reset();
},
enabled: (a0) => {
c15770_5 = a0;
}
};
}