decord/source/69_isEnabled.js

68 lines
1.7 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 69
// Function ID: 1449
// Name: isEnabled
// Dependencies: []
// Module 69 (isEnabled)
2026-07-23 10:11:24 +00:00
const global = arg0;
function isEnabled() {
if (global.nativeTraceIsTracing) {
let nativeTraceIsTracingResult = global.nativeTraceIsTracing(c1);
2026-07-20 16:05:17 +00:00
} else {
const _Boolean = Boolean;
2026-07-23 10:11:24 +00:00
nativeTraceIsTracingResult = Boolean(global.__RCTProfileIsProfiling);
2026-07-20 16:05:17 +00:00
}
return nativeTraceIsTracingResult;
}
2026-07-23 10:11:24 +00:00
let c1 = 8192;
let c2 = 0;
2026-07-20 16:05:17 +00:00
arg5.isEnabled = isEnabled;
arg5.setEnabled = function setEnabled(arg0) {
};
arg5.beginEvent = function beginEvent(arg0) {
if (isEnabled()) {
let tmp = arg0;
if ("function" === typeof arg0) {
tmp = arg0();
}
2026-07-23 10:11:24 +00:00
const result = global.nativeTraceBeginSection(c1, tmp, arg1);
2026-07-20 16:05:17 +00:00
}
};
arg5.endEvent = function endEvent(arg0) {
if (isEnabled()) {
2026-07-23 10:11:24 +00:00
const result = global.nativeTraceEndSection(c1, arg0);
2026-07-20 16:05:17 +00:00
}
};
arg5.beginAsyncEvent = function beginAsyncEvent(arg0) {
if (isEnabled()) {
closure_2 = closure_2 + 1;
let tmp3 = arg0;
if ("function" === typeof arg0) {
tmp3 = arg0();
}
2026-07-23 10:11:24 +00:00
const result = global.nativeTraceBeginAsyncSection(c1, tmp3, tmp, arg1);
2026-07-20 16:05:17 +00:00
}
return closure_2;
};
arg5.endAsyncEvent = function endAsyncEvent(arg0, arg1) {
if (isEnabled()) {
let tmp = arg0;
if ("function" === typeof arg0) {
tmp = arg0();
}
2026-07-23 10:11:24 +00:00
const result = global.nativeTraceEndAsyncSection(c1, tmp, arg1, arg2);
2026-07-20 16:05:17 +00:00
}
};
arg5.counterEvent = function counterEvent(pending_js_to_native_queue, length) {
if (isEnabled()) {
let tmp = pending_js_to_native_queue;
if ("function" === typeof pending_js_to_native_queue) {
tmp = pending_js_to_native_queue();
}
2026-07-23 10:11:24 +00:00
if (global.nativeTraceCounter) {
global.nativeTraceCounter(c1, tmp, length);
2026-07-20 16:05:17 +00:00
}
}
};