From 6206e49d56ef6d505dfe604fcb04d5b0124bfd98 Mon Sep 17 00:00:00 2001 From: Vitali Zaidman Date: Wed, 2 Jul 2025 14:02:26 +0100 Subject: [PATCH 1/2] parse empty and "address at" urls as non-hyperlinked text --- buildtools | 2 +- third_party/depot_tools | 2 +- third_party/inspector_protocol | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buildtools b/buildtools index 6f359296daa8..f30f8f10c9d1 160000 --- a/buildtools +++ b/buildtools @@ -1 +1 @@ -Subproject commit 6f359296daa889aa726f3d05046b9f37be241169 +Subproject commit f30f8f10c9d1ad97480dc08eb72f7d9d1bf4cf89 diff --git a/third_party/depot_tools b/third_party/depot_tools index f40ddcd8d516..abc510988246 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools @@ -1 +1 @@ -Subproject commit f40ddcd8d51626fb7be3ab3c418b3f3be801623f +Subproject commit abc51098824678cbce29d7913c4951a857033c49 diff --git a/third_party/inspector_protocol b/third_party/inspector_protocol index 940abfc668be..6d1ae0f13aae 160000 --- a/third_party/inspector_protocol +++ b/third_party/inspector_protocol @@ -1 +1 @@ -Subproject commit 940abfc668be2591483f7132145593c6a047f3cf +Subproject commit 6d1ae0f13aae6ad381ca31b17b88a0f5af29ca94 From f516628e2286081257fe757c44473860fae0ee7b Mon Sep 17 00:00:00 2001 From: Vitali Zaidman Date: Tue, 1 Jul 2025 14:18:33 +0100 Subject: [PATCH 2/2] track when a special stack trace symbolication occurs --- buildtools | 2 +- front_end/core/host/RNPerfMetrics.ts | 19 ++++++++++++++++++- front_end/panels/console/ErrorStackParser.ts | 10 ++++++++++ third_party/depot_tools | 2 +- third_party/inspector_protocol | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/buildtools b/buildtools index f30f8f10c9d1..6f359296daa8 160000 --- a/buildtools +++ b/buildtools @@ -1 +1 @@ -Subproject commit f30f8f10c9d1ad97480dc08eb72f7d9d1bf4cf89 +Subproject commit 6f359296daa889aa726f3d05046b9f37be241169 diff --git a/front_end/core/host/RNPerfMetrics.ts b/front_end/core/host/RNPerfMetrics.ts index 07b50d7aa7a3..3696e2276f74 100644 --- a/front_end/core/host/RNPerfMetrics.ts +++ b/front_end/core/host/RNPerfMetrics.ts @@ -270,6 +270,15 @@ class RNPerfMetrics { }); } + stackTraceSymbolicationSucceeded(specialHermesFrameTypes: string[]): void { + this.sendEvent({ + eventName: 'StackTraceSymbolicationSucceeded', + params: { + specialHermesFrameTypes, + }, + }); + } + panelShown(_panelName: string, _isLaunching?: boolean): void { // no-op // We only care about the "main" and "drawer" panels for now via panelShownInLocation(…) @@ -443,10 +452,18 @@ export type StackTraceSymbolicationFailed = Readonly<{ }>, }>; +export type StackTraceSymbolicationSucceeded = Readonly<{ + eventName: 'StackTraceSymbolicationSucceeded', + params: Readonly<{ + specialHermesFrameTypes: string[], + }>, +}>; + export type ReactNativeChromeDevToolsEvent = EntrypointLoadingStartedEvent|EntrypointLoadingFinishedEvent|DebuggerReadyEvent|BrowserVisibilityChangeEvent| BrowserErrorEvent|RemoteDebuggingTerminatedEvent|DeveloperResourceLoadingStartedEvent| DeveloperResourceLoadingFinishedEvent|FuseboxSetClientMetadataStartedEvent|FuseboxSetClientMetadataFinishedEvent| - MemoryPanelActionStartedEvent|MemoryPanelActionFinishedEvent|PanelShownEvent|PanelClosedEvent|StackTraceSymbolicationFailed; + MemoryPanelActionStartedEvent|MemoryPanelActionFinishedEvent|PanelShownEvent|PanelClosedEvent| + StackTraceSymbolicationFailed|StackTraceSymbolicationSucceeded; export type DecoratedReactNativeChromeDevToolsEvent = CommonEventFields&ReactNativeChromeDevToolsEvent; diff --git a/front_end/panels/console/ErrorStackParser.ts b/front_end/panels/console/ErrorStackParser.ts index fa76b3aac2fd..76099805238c 100644 --- a/front_end/panels/console/ErrorStackParser.ts +++ b/front_end/panels/console/ErrorStackParser.ts @@ -71,6 +71,8 @@ export function parseSourcePositionsFromErrorStack( const lines = stack.split('\n'); const linkInfos = []; + const specialHermesFramesParsed = new Set(); + for (const line of lines) { const match = /^\s*at\s(async\s)?/.exec(line); if (!match) { @@ -118,6 +120,9 @@ export function parseSourcePositionsFromErrorStack( } else { linkInfos.push({line, isCallFrame}); } + if (specialHermesFrameType !== null) { + specialHermesFramesParsed.add(specialHermesFrameType); + } continue; } let url = parseOrScriptMatch(debuggerModel, splitResult.url); @@ -142,6 +147,11 @@ export function parseSourcePositionsFromErrorStack( }, }); } + + if (linkInfos?.length) { + Host.rnPerfMetrics.stackTraceSymbolicationSucceeded(Array.from(specialHermesFramesParsed)); + } + return linkInfos; } diff --git a/third_party/depot_tools b/third_party/depot_tools index abc510988246..f40ddcd8d516 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools @@ -1 +1 @@ -Subproject commit abc51098824678cbce29d7913c4951a857033c49 +Subproject commit f40ddcd8d51626fb7be3ab3c418b3f3be801623f diff --git a/third_party/inspector_protocol b/third_party/inspector_protocol index 6d1ae0f13aae..940abfc668be 160000 --- a/third_party/inspector_protocol +++ b/third_party/inspector_protocol @@ -1 +1 @@ -Subproject commit 6d1ae0f13aae6ad381ca31b17b88a0f5af29ca94 +Subproject commit 940abfc668be2591483f7132145593c6a047f3cf