File tree Expand file tree Collapse file tree 9 files changed +9
-2
lines changed
react-devtools-extensions
react-devtools-shared/src/backend Expand file tree Collapse file tree 9 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,7 @@ module.exports = {
496496 __IS_CHROME__ : 'readonly' ,
497497 __IS_FIREFOX__ : 'readonly' ,
498498 __IS_EDGE__ : 'readonly' ,
499+ __IS_NATIVE__ : 'readonly' ,
499500 __IS_INTERNAL_VERSION__ : 'readonly' ,
500501 } ,
501502 } ,
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ module.exports = {
7171 __IS_FIREFOX__ : false ,
7272 __IS_CHROME__ : false ,
7373 __IS_EDGE__ : false ,
74+ __IS_NATIVE__ : true ,
7475 'process.env.DEVTOOLS_PACKAGE' : `"react-devtools-core"` ,
7576 'process.env.DEVTOOLS_VERSION' : `"${ DEVTOOLS_VERSION } "` ,
7677 'process.env.GITHUB_URL' : `"${ GITHUB_URL } "` ,
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ module.exports = {
7777 __IS_CHROME__ : IS_CHROME ,
7878 __IS_FIREFOX__ : IS_FIREFOX ,
7979 __IS_EDGE__ : IS_EDGE ,
80+ __IS_NATIVE__ : false ,
8081 } ) ,
8182 new Webpack . SourceMapDevToolPlugin ( {
8283 filename : '[file].map' ,
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ module.exports = {
112112 __IS_CHROME__ : IS_CHROME ,
113113 __IS_FIREFOX__ : IS_FIREFOX ,
114114 __IS_EDGE__ : IS_EDGE ,
115+ __IS_NATIVE__ : false ,
115116 __IS_INTERNAL_VERSION__ : IS_INTERNAL_VERSION ,
116117 'process.env.DEVTOOLS_PACKAGE' : `"react-devtools-extensions"` ,
117118 'process.env.DEVTOOLS_VERSION' : `"${ DEVTOOLS_VERSION } "` ,
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ module.exports = {
7777 __IS_CHROME__ : false ,
7878 __IS_FIREFOX__ : false ,
7979 __IS_EDGE__ : false ,
80+ __IS_NATIVE__ : false ,
8081 'process.env.DEVTOOLS_PACKAGE' : `"react-devtools-inline"` ,
8182 'process.env.DEVTOOLS_VERSION' : `"${ DEVTOOLS_VERSION } "` ,
8283 'process.env.EDITOR_URL' : EDITOR_URL != null ? `"${ EDITOR_URL } "` : null ,
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ export function patch({
294294 // formatting. Otherwise it is left alone. So we prefix it. Otherwise we just override it
295295 // to our own stack.
296296 fakeError . stack =
297- __IS_CHROME__ || __IS_EDGE__
297+ __IS_CHROME__ || __IS_EDGE__ || __IS_NATIVE__
298298 ? ( enableOwnerStacks
299299 ? 'Error Stack:'
300300 : 'Error Component Stack:' ) + componentStack
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export function describeBuiltInComponentFrame(name: string): string {
3030 }
3131 }
3232 let suffix = '' ;
33- if ( __IS_CHROME__ || __IS_EDGE__ ) {
33+ if ( __IS_CHROME__ || __IS_EDGE__ || __IS_NATIVE__ ) {
3434 suffix = ' (<anonymous>)' ;
3535 } else if ( __IS_FIREFOX__ ) {
3636 suffix = '@unknown:0:0' ;
Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ declare const __TEST__: boolean;
1515declare const __IS_FIREFOX__: boolean ;
1616declare const __IS_CHROME__: boolean ;
1717declare const __IS_EDGE__: boolean ;
18+ declare const __IS_NATIVE__: boolean ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ global.__TEST__ = true;
1414global . __IS_FIREFOX__ = false ;
1515global . __IS_CHROME__ = false ;
1616global . __IS_EDGE__ = false ;
17+ global . __IS_NATIVE__ = false ;
1718
1819const ReactVersionTestingAgainst = process . env . REACT_VERSION || ReactVersion ;
1920
You can’t perform that action at this time.
0 commit comments