File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Submodule
buildtools updated from f30f8f1 to 6f35929
Original file line number Diff line number Diff line change @@ -270,6 +270,15 @@ class RNPerfMetrics {
270270 } ) ;
271271 }
272272
273+ stackTraceSymbolicationSucceeded ( specialHermesFrameTypes : string [ ] ) : void {
274+ this . sendEvent ( {
275+ eventName : 'StackTraceSymbolicationSucceeded' ,
276+ params : {
277+ specialHermesFrameTypes,
278+ } ,
279+ } ) ;
280+ }
281+
273282 panelShown ( _panelName : string , _isLaunching ?: boolean ) : void {
274283 // no-op
275284 // We only care about the "main" and "drawer" panels for now via panelShownInLocation(…)
@@ -443,10 +452,18 @@ export type StackTraceSymbolicationFailed = Readonly<{
443452 } > ,
444453} > ;
445454
455+ export type StackTraceSymbolicationSucceeded = Readonly < {
456+ eventName : 'StackTraceSymbolicationSucceeded' ,
457+ params : Readonly < {
458+ specialHermesFrameTypes : string [ ] ,
459+ } > ,
460+ } > ;
461+
446462export type ReactNativeChromeDevToolsEvent =
447463 EntrypointLoadingStartedEvent | EntrypointLoadingFinishedEvent | DebuggerReadyEvent | BrowserVisibilityChangeEvent |
448464 BrowserErrorEvent | RemoteDebuggingTerminatedEvent | DeveloperResourceLoadingStartedEvent |
449465 DeveloperResourceLoadingFinishedEvent | FuseboxSetClientMetadataStartedEvent | FuseboxSetClientMetadataFinishedEvent |
450- MemoryPanelActionStartedEvent | MemoryPanelActionFinishedEvent | PanelShownEvent | PanelClosedEvent | StackTraceSymbolicationFailed ;
466+ MemoryPanelActionStartedEvent | MemoryPanelActionFinishedEvent | PanelShownEvent | PanelClosedEvent |
467+ StackTraceSymbolicationFailed | StackTraceSymbolicationSucceeded ;
451468
452469export type DecoratedReactNativeChromeDevToolsEvent = CommonEventFields & ReactNativeChromeDevToolsEvent ;
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ export function parseSourcePositionsFromErrorStack(
7171
7272 const lines = stack . split ( '\n' ) ;
7373 const linkInfos = [ ] ;
74+ const specialHermesFramesParsed = new Set < SpecialHermesStackTraceFrameTypes > ( ) ;
75+
7476 for ( const line of lines ) {
7577 const match = / ^ \s * a t \s ( a s y n c \s ) ? / . exec ( line ) ;
7678 if ( ! match ) {
@@ -118,6 +120,9 @@ export function parseSourcePositionsFromErrorStack(
118120 } else {
119121 linkInfos . push ( { line, isCallFrame} ) ;
120122 }
123+ if ( specialHermesFrameType !== null ) {
124+ specialHermesFramesParsed . add ( specialHermesFrameType ) ;
125+ }
121126 continue ;
122127 }
123128 let url = parseOrScriptMatch ( debuggerModel , splitResult . url ) ;
@@ -142,6 +147,11 @@ export function parseSourcePositionsFromErrorStack(
142147 } ,
143148 } ) ;
144149 }
150+
151+ if ( linkInfos ?. length ) {
152+ Host . rnPerfMetrics . stackTraceSymbolicationSucceeded ( Array . from ( specialHermesFramesParsed ) ) ;
153+ }
154+
145155 return linkInfos ;
146156}
147157
You can’t perform that action at this time.
0 commit comments