-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdc-polyfill.js
38 lines (27 loc) · 918 Bytes
/
dc-polyfill.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const checks = require('./checks.js');
require('./primordials.js');
let dc = checks.hasDiagnosticsChannel()
? require('diagnostics_channel')
: require('./reimplementation.js');
if (checks.hasGarbageCollectionBug()) {
dc = require('./patch-garbage-collection-bug.js')(dc);
}
if (!checks.hasTopSubscribeUnsubscribe()) {
dc = require('./patch-top-subscribe-unsubscribe.js')(dc);
}
if (!checks.hasChUnsubscribeReturn()) {
dc = require('./patch-channel-unsubscribe-return.js')(dc);
}
if (!checks.hasChannelStoreMethods()) {
dc = require('./patch-channel-store-methods.js')(dc);
}
if (!checks.hasTracingChannel()) {
dc = require('./patch-tracing-channel.js')(dc);
}
if (checks.hasSyncUnsubscribeBug()) {
dc = require('./patch-sync-unsubscribe-bug.js')(dc);
}
if (!checks.hasTracingChannelHasSubscribers()) {
dc = require('./patch-tracing-channel-has-subscribers.js')(dc);
}
module.exports = dc;