68 lines
2.9 KiB
React
68 lines
2.9 KiB
React
/* Metro module 419; source: unknown; dependencies: [44] */
|
|
function _fun5885(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:460:6, offset: 0x00ce8d3e, size: 126 bytes, params: 8, frame: 16
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = {addPoolingTo: addPoolingTo, oneArgumentPooler: function(a0) {
|
|
var value;
|
|
if (this.instancePool.length) {
|
|
value = this.instancePool.pop();
|
|
this.call(value, a0);
|
|
return value;
|
|
}
|
|
value = Object.create(this.prototype, {constructor: {value: this}});
|
|
var value2 = new this(a0);
|
|
return value2 instanceof Object ? value2 : value;
|
|
}, twoArgumentPooler: function(a0, a1) {
|
|
var value;
|
|
if (this.instancePool.length) {
|
|
value = this.instancePool.pop();
|
|
this.call(value, a0, a1);
|
|
return value;
|
|
}
|
|
value = Object.create(this.prototype, {constructor: {value: this}});
|
|
var value2 = new this(a0, a1);
|
|
return value2 instanceof Object ? value2 : value;
|
|
}, threeArgumentPooler: function(a0, a1, a2) {
|
|
var value;
|
|
if (this.instancePool.length) {
|
|
value = this.instancePool.pop();
|
|
this.call(value, a0, a1, a2);
|
|
return value;
|
|
}
|
|
value = Object.create(this.prototype, {constructor: {value: this}});
|
|
var value2 = new this(a0, a1, a2);
|
|
return value2 instanceof Object ? value2 : value;
|
|
}, fourArgumentPooler: function(a0, a1, a2, a3) {
|
|
var value;
|
|
if (this.instancePool.length) {
|
|
value = this.instancePool.pop();
|
|
this.call(value, a0, a1, a2, a3);
|
|
return value;
|
|
}
|
|
value = Object.create(this.prototype, {constructor: {value: this}});
|
|
var value2 = new this(a0, a1, a2, a3);
|
|
return value2 instanceof Object ? value2 : value;
|
|
}};
|
|
}
|
|
|
|
function standardReleaser(a0) { // fn#5887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:460:232, offset: 0x00ce8e06, size: 95 bytes, params: 2, frame: 15
|
|
(importDefault(44) /* metro dependency 44 */)(a0 instanceof this,
|
|
'Trying to release an instance into a pool of a different type.');
|
|
a0.destructor();
|
|
if (this.instancePool.length < this.poolSize) {
|
|
this.instancePool.push(a0);
|
|
}
|
|
}
|
|
|
|
function addPoolingTo(a0, a1) { // fn#5888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:460:454, offset: 0x00ce8e65, size: 65 bytes, params: 3, frame: 3
|
|
const value = a1;
|
|
a0.instancePool = [];
|
|
a0.getPooled = value || oneArgumentPooler;
|
|
if (!a0.poolSize) {
|
|
a0.poolSize = 10;
|
|
}
|
|
a0.release = standardReleaser;
|
|
return a0;
|
|
}
|
|
|