Skip to content

Commit 5298604

Browse files
Connor ClarkDevtools-frontend LUCI CQ
authored andcommitted
[RPP] Force tab targetType in trace_app
This is required for some features to work, such as linkifying the console source location in the bottom-up / call-tree tables. The short summary is that `primaryPageTarget()` does not return the correct target for rehydrated connections unless the first / root target is of type tab, which breaks linkifying. Bug: 427455148 Change-Id: I62e656d9f92892d8b051e0c7b98c663b432499d1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7037208 Reviewed-by: Paul Irish <[email protected]> Auto-Submit: Connor Clark <[email protected]> Commit-Queue: Connor Clark <[email protected]>
1 parent 6622f52 commit 5298604

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

front_end/entrypoints/inspector_main/InspectorMain.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export class InspectorMainImpl implements Common.Runnable.Runnable {
6565
await SDK.Connections.initMainConnection(async () => {
6666
const type = Root.Runtime.Runtime.queryParam('v8only') ?
6767
SDK.Target.Type.NODE :
68-
(Root.Runtime.Runtime.queryParam('targetType') === 'tab' ? SDK.Target.Type.TAB : SDK.Target.Type.FRAME);
68+
(Root.Runtime.Runtime.queryParam('targetType') === 'tab' || Root.Runtime.Runtime.isTraceApp() ?
69+
SDK.Target.Type.TAB :
70+
SDK.Target.Type.FRAME);
6971
// TODO(crbug.com/1348385): support waiting for debugger with tab target.
7072
const waitForDebuggerInPage =
7173
type === SDK.Target.Type.FRAME && Root.Runtime.Runtime.queryParam('panel') === 'sources';

0 commit comments

Comments
 (0)