Skip to content

Commit 990dd86

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Move DebugEnvironment helper to open source
Summary: This is an internal only module that we use to detect whether we are in async debugging mode. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D20879780 fbshipit-source-id: 5915f4e1c54a3fda0cf607c77f463120264fdbc4
1 parent c4806fa commit 990dd86

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
* @format
8+
* @flow strict-local
9+
*/
10+
11+
'use strict';
12+
13+
export let isAsyncDebugging: boolean = false;
14+
15+
if (__DEV__) {
16+
// These native interfaces don't exist in asynchronous debugging environments.
17+
isAsyncDebugging =
18+
!global.nativeExtensions &&
19+
!global.nativeCallSyncHook &&
20+
!global.RN$Bridgeless;
21+
}

0 commit comments

Comments
 (0)