File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,18 @@ import {NoPriority} from './SchedulerPriorities';
15
15
let runIdCounter : number = 0 ;
16
16
let mainThreadIdCounter : number = 0 ;
17
17
18
- // We only use SharedArrayBuffer when cross origin isolation is enabled.
19
- // $FlowFixMe Flow doesn't know about SharedArrayBuffer
20
- const isEnabledSharedArrayBuffer = typeof SharedArrayBuffer === 'function' && typeof window !== 'undefined' && window . crossOriginIsolated === true
18
+ const isEnabledSharedArrayBuffer =
19
+ // $FlowFixMe Flow doesn't know about SharedArrayBuffer
20
+ typeof SharedArrayBuffer === 'function' &&
21
+ // We only use SharedArrayBuffer when cross origin isolation is enabled.
22
+ typeof window !== 'undefined' &&
23
+ window . crossOriginIsolated === true ;
21
24
22
25
const profilingStateSize = 4 ;
23
26
export const sharedProfilingBuffer = enableProfiling
24
- ?
25
- isEnabledSharedArrayBuffer
27
+ ? isEnabledSharedArrayBuffer
26
28
? new SharedArrayBuffer ( profilingStateSize * Int32Array . BYTES_PER_ELEMENT )
27
- :
28
- typeof ArrayBuffer === 'function'
29
+ : typeof ArrayBuffer === 'function'
29
30
? new ArrayBuffer ( profilingStateSize * Int32Array . BYTES_PER_ELEMENT )
30
31
: null // Don't crash the init path on IE9
31
32
: null ;
You can’t perform that action at this time.
0 commit comments