211 lines
9.5 KiB
React
211 lines
9.5 KiB
React
/* Metro module 1031; source: unknown; dependencies: [65, 826, 1032, 1009] */
|
|
function _fun10757(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:6, offset: 0x00d953ea, size: 108 bytes, params: 8, frame: 17
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(65) /* metro dependency 65 */;
|
|
exports.nativeLinkedErrorsIntegration = function() {
|
|
var r0;
|
|
var env0_0 = (arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}).key || 'cause';
|
|
r0 = r0.limit || 5;
|
|
var env0_1 = r0;
|
|
return {name: 'NativeLinkedErrors', setupOnce: _fun10764, preprocessEvent: _fun10765};
|
|
};
|
|
}
|
|
|
|
function walkErrorTree(a0, a1, a2, a3) { // fn#10758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:106, offset: 0x00d95456, size: 501 bytes, params: 5, frame: 29
|
|
var name;
|
|
var message;
|
|
var appleDebugImages;
|
|
var r14;
|
|
var object;
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
var isPlainObject2;
|
|
var value5;
|
|
var value6;
|
|
var appleException;
|
|
var value7;
|
|
var walkErrorTreeBinding;
|
|
var value9;
|
|
const value = undefined;
|
|
const r2 = arguments.length > 4 && value !== arguments[4] ? arguments[4] : [];
|
|
const r1 = arguments.length > 5 && value !== arguments[5] ? arguments[5] : [];
|
|
const property = a2[a3];
|
|
if (property) {
|
|
if (r2.length + 1 >= a1) {
|
|
return {exceptions: r2, debugImages: r1};
|
|
}
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
if (moduleValue.isString(property)) {
|
|
appleDebugImages = value;
|
|
walkErrorTreeBinding = walkErrorTree;
|
|
value9 = [].concat(env0_2(r2), [{value: property}]);
|
|
object = [];
|
|
return walkErrorTreeBinding(a0, a1, property, a3, value9, object.concat(env0_2(r1),
|
|
env0_2(appleDebugImages || [])));
|
|
}
|
|
if ('stackElements' in property) {
|
|
value7 = exceptionFromJavaStackElements(property);
|
|
appleDebugImages = value;
|
|
r14 = value7;
|
|
walkErrorTreeBinding = walkErrorTree;
|
|
value9 = [].concat(env0_2(r2), [r14]);
|
|
object = [];
|
|
return walkErrorTreeBinding(a0, a1, property, a3, value9, object.concat(env0_2(r1),
|
|
env0_2(appleDebugImages || [])));
|
|
}
|
|
if ('stackReturnAddresses' in property) {
|
|
value6 = exceptionFromAppleStackReturnAddresses(property);
|
|
appleException = value6.appleException;
|
|
appleDebugImages = value6.appleDebugImages;
|
|
r14 = appleException;
|
|
walkErrorTreeBinding = walkErrorTree;
|
|
value9 = [].concat(env0_2(r2), [r14]);
|
|
object = [];
|
|
return walkErrorTreeBinding(a0, a1, property, a3, value9, object.concat(env0_2(r1),
|
|
env0_2(appleDebugImages || [])));
|
|
}
|
|
moduleValue2 = require(826) /* metro dependency 826 */;
|
|
if (moduleValue2.isInstanceOf(property, global.Error)) {
|
|
value5 = (require(1032) /* metro dependency 1032 */).exceptionFromError(a0, a2[a3]);
|
|
appleDebugImages = value;
|
|
r14 = value5;
|
|
walkErrorTreeBinding = walkErrorTree;
|
|
value9 = [].concat(env0_2(r2), [r14]);
|
|
object = [];
|
|
return walkErrorTreeBinding(a0, a1, property, a3, value9, object.concat(env0_2(r1),
|
|
env0_2(appleDebugImages || [])));
|
|
}
|
|
isPlainObject2 = (require(826) /* metro dependency 826 */).isPlainObject(property);
|
|
object = {};
|
|
if (isPlainObject2) {
|
|
name = property.name;
|
|
name = typeof name !== 'string' ? value : property.name;
|
|
object.type = name;
|
|
message = property.message;
|
|
message = typeof message !== 'string' ? value : property.message;
|
|
object.value = message;
|
|
appleDebugImages = value;
|
|
r14 = object;
|
|
walkErrorTreeBinding = walkErrorTree;
|
|
value9 = [].concat(env0_2(r2), [r14]);
|
|
object = [];
|
|
return walkErrorTreeBinding(a0, a1, property, a3, value9, object.concat(env0_2(r1),
|
|
env0_2(appleDebugImages || [])));
|
|
}
|
|
object.exceptions = r2;
|
|
object.debugImages = r1;
|
|
return object;
|
|
}
|
|
return {exceptions: r2, debugImages: r1};
|
|
}
|
|
|
|
function fetchNativePackage() { // fn#10762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:1510, offset: 0x00d957bf, size: 61 bytes, params: 1, frame: 12
|
|
env0_3 = env0_3 === null ? (require(1009) /* metro dependency 1009 */).NATIVE.fetchNativePackageName() : env0_3;
|
|
return env0_3;
|
|
}
|
|
|
|
function nativeLinkedErrorsIntegration() { // fn#10763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:1635, offset: 0x00d957fc, size: 96 bytes, params: 1, frame: 5
|
|
const r0 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
if (r0.key) {
|
|
}
|
|
if (r0.limit) {
|
|
}
|
|
return {name: 'NativeLinkedErrors', setupOnce: function() {
|
|
}, preprocessEvent: preprocessEvent_10765};
|
|
}
|
|
|
|
function exceptionFromJavaStackElements({name, message, stackElements}) { // fn#10759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:394, owner: walkErrorTree.exceptionFromJavaStackElements, offset: 0x00d9564b, size: 87 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const env0_0 = fetchNativePackage();
|
|
const object3 = {};
|
|
object3.type = name;
|
|
object3.value = message;
|
|
const object4 = {};
|
|
object4.frames = stackElements.map(_fun10760).reverse();
|
|
object3.stacktrace = object4;
|
|
return object3;
|
|
}
|
|
|
|
function exceptionFromAppleStackReturnAddresses({stackReturnAddresses, name, message}) { // fn#10761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:795, owner: walkErrorTree.exceptionFromAppleStackReturnAddresses, offset: 0x00d95724, size: 155 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__;
|
|
value = undefined;
|
|
const NATIVE = (require(1009) /* metro dependency 1009 */).NATIVE;
|
|
const nativeStackFramesBy = NATIVE.fetchNativeStackFramesBy(stackReturnAddresses);
|
|
const object = {};
|
|
object.type = name;
|
|
object.value = message;
|
|
let r6 = nativeStackFramesBy == null ? value : nativeStackFramesBy.frames.reverse();
|
|
r6 = !r6 ? [] : r6;
|
|
object.stacktrace = {frames: r6};
|
|
return {appleException: object,
|
|
appleDebugImages: (nativeStackFramesBy == null ? value : nativeStackFramesBy.debugMetaImages) || []};
|
|
}
|
|
|
|
function nativeLinkedErrorsIntegrationPreprocessEvent(a0, a1, a2) { // fn#10765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:1852, owner: nativeLinkedErrorsIntegration.preprocessEvent, offset: 0x00d9585c, size: 314 bytes, params: 4, frame: 22
|
|
var r3;
|
|
var value2;
|
|
var moduleValue;
|
|
var value3;
|
|
var exceptions;
|
|
var debugImages;
|
|
var items;
|
|
var concat;
|
|
var binding;
|
|
var debug_meta;
|
|
var images;
|
|
var push;
|
|
var apply;
|
|
const limitBinding = limit;
|
|
const keyBinding = key;
|
|
let exception = a0.exception;
|
|
const value = undefined;
|
|
if (exception === null || value === exception ? value : exception.values) {
|
|
if (a1) {
|
|
value2 = environment.__proto__;
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
if (moduleValue.isInstanceOf(a1.originalException, global.Error)) {
|
|
value3 = walkErrorTree(a2.getOptions().stackParser, limitBinding, a1.originalException, keyBinding);
|
|
exceptions = value3.exceptions;
|
|
debugImages = value3.debugImages;
|
|
exception = a0.exception;
|
|
items = [];
|
|
concat = items.concat;
|
|
binding = env1_2;
|
|
exception.values = Reflect.apply(concat, items, [binding(a0.exception.values), env1_2(exceptions)]);
|
|
debug_meta = a0.debug_meta;
|
|
r3 = debug_meta || ({});
|
|
a0.debug_meta = r3;
|
|
debug_meta = a0.debug_meta;
|
|
images = a0.debug_meta.images;
|
|
r3 = images || [];
|
|
debug_meta.images = r3;
|
|
debug_meta = a0.debug_meta;
|
|
images = debug_meta.images;
|
|
push = images.push;
|
|
apply = push.apply;
|
|
binding = env1_2;
|
|
Reflect.apply(apply, push, [images, binding(debugImages || [])]);
|
|
}
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun10760(a0) { // fn#10760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1158:539, offset: 0x00d956a2, size: 130 bytes, params: 2, frame: 14
|
|
const object2 = {platform: 'java'};
|
|
object2.module = a0.className;
|
|
object2.filename = a0.fileName;
|
|
let lineNumber = a0.lineNumber;
|
|
const value = undefined;
|
|
lineNumber = lineNumber >= 0 ? a0.lineNumber : value;
|
|
object2.lineno = lineNumber;
|
|
object2.function = a0.methodName;
|
|
const r3 = env0_0 === null || !a0.className.startsWith(env0_0);
|
|
object2.in_app = r3 ? value : !r3;
|
|
return object2;
|
|
}
|
|
|