diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-01-12 17:04:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 17:04:08 -0800 |
commit | b3b818671e2e71648bccc87fc7d27ab81cc68aeb (patch) | |
tree | b2c8ef601781025d4757abbd1992ea02224d6224 /patches/metro-runtime+0.80.4.patch | |
parent | 8cc1bd0c40c5eb6ba6ef7949d33f80d79d75f410 (diff) | |
download | voidsky-b3b818671e2e71648bccc87fc7d27ab81cc68aeb.tar.zst |
Bump react-native@0.73.2 (#2519)
* Bump react-native@0.73.2 * Remove old patch
Diffstat (limited to 'patches/metro-runtime+0.80.4.patch')
-rw-r--r-- | patches/metro-runtime+0.80.4.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/patches/metro-runtime+0.80.4.patch b/patches/metro-runtime+0.80.4.patch new file mode 100644 index 000000000..65303775d --- /dev/null +++ b/patches/metro-runtime+0.80.4.patch @@ -0,0 +1,50 @@ +diff --git a/node_modules/metro-runtime/src/polyfills/require.js b/node_modules/metro-runtime/src/polyfills/require.js +index ce67cb4..eeeae84 100644 +--- a/node_modules/metro-runtime/src/polyfills/require.js ++++ b/node_modules/metro-runtime/src/polyfills/require.js +@@ -22,6 +22,13 @@ global.__c = clear; + global.__registerSegment = registerSegment; + var modules = clear(); + ++if (__DEV__) { ++ // Added by Dan for module init logging. ++ global.__INIT_LOGS__ = [] ++ var initModuleCounter = 0 ++ var initModuleStack = [] ++} ++ + // Don't use a Symbol here, it would pull in an extra polyfill with all sorts of + // additional stuff (e.g. Array.from). + const EMPTY = {}; +@@ -303,7 +310,30 @@ function loadModuleImplementation(moduleId, module) { + throw module.error; + } + if (__DEV__) { +- var Systrace = requireSystrace(); ++ // Added by Dan for module init logging. ++ var Systrace = { ++ beginEvent(label) { ++ let fullLabel = initModuleCounter++ + ' ' + label ++ global.__INIT_LOGS__.push( ++ ' '.repeat(initModuleStack.length) + ++ ' ENTER ' + fullLabel ++ ) ++ initModuleStack.push({ ++ fullLabel, ++ startTime: nativePerformanceNow(), ++ }) ++ }, ++ endEvent() { ++ const res = initModuleStack.pop() ++ const fullLabel = res.fullLabel ++ const startTime = res.startTime ++ const timeElapsed = Math.round(nativePerformanceNow() - startTime) ++ global.__INIT_LOGS__.push( ++ ' '.repeat(initModuleStack.length) + ++ ' LEAVE ' + fullLabel + ' [' + timeElapsed + 'ms]', ++ ) ++ } ++ }; + var Refresh = requireRefresh(); + } + |