Skip to content

Chrome DevTools for coding agents

chore(deps): bump third_party/devtools-frontend from `9b6645d` to `717509a` (#2724)

dependabot[bot]684d5cfce4e2
diff --git a/src/devtools/DevtoolsUtils.ts b/src/devtools/DevtoolsUtils.ts
index 4195b3e3..916242b9 100644
--- a/src/devtools/DevtoolsUtils.ts
+++ b/src/devtools/DevtoolsUtils.ts
@@ -219,6 +219,16 @@ const DISABLE_NETWORK = {
},
};
+export type RemoteObjectLike =
+ Protocol.Runtime.RemoteObject | DevTools.Protocol.Runtime.RemoteObject;
+
+export type ExceptionDetailsLike =
+ | Protocol.Runtime.ExceptionDetails
+ | DevTools.Protocol.Runtime.ExceptionDetails;
+
+export type StackTraceLike =
+ Protocol.Runtime.StackTrace | DevTools.Protocol.Runtime.StackTrace;
+
/**
* Constructed from Runtime.ExceptionDetails of an uncaught error.
*
@@ -243,7 +253,7 @@ export class SymbolizedError {
static async fromDetails(opts: {
devTools?: TargetUniverse;
- details: Protocol.Runtime.ExceptionDetails;
+ details: ExceptionDetailsLike;
targetId: string;
includeStackAndCause?: boolean;
resolvedStackTraceForTesting?: DevTools.StackTrace.StackTrace.StackTrace;
@@ -301,7 +311,7 @@ export class SymbolizedError {
static async fromError(opts: {
devTools?: TargetUniverse;
- error: Protocol.Runtime.RemoteObject;
+ error: RemoteObjectLike;
targetId: string;
}): Promise<SymbolizedError> {
const details = await SymbolizedError.#getExceptionDetails(
@@ -323,7 +333,7 @@ export class SymbolizedError {
);
}
- static #getMessage(details: Protocol.Runtime.ExceptionDetails): string {
+ static #getMessage(details: ExceptionDetailsLike): string {
// For Runtime.exceptionThrown with a present exception object, `details.text` will be "Uncaught" and
// we have to manually parse out the error text from the exception description.
// In the case of Runtime.getExceptionDetails, `details.text` has the Error.message.
@@ -336,18 +346,16 @@ export class SymbolizedError {
return details.text;
}
- static #getMessageFromException(
- error: Protocol.Runtime.RemoteObject,
- ): string {
+ static #getMessageFromException(error: RemoteObjectLike): string {
const messageWithRest = error.description?.split('\n at ', 2) ?? [];
return messageWithRest[0] ?? '';
}
static async #getExceptionDetails(
devTools: TargetUniverse | undefined,
- error: Protocol.Runtime.RemoteObject,
+ error: RemoteObjectLike,
targetId: string,
- ): Promise<Protocol.Runtime.ExceptionDetails | null> {
+ ): Promise<DevTools.Protocol.Runtime.ExceptionDetails | null> {
if (!devTools || (error.type !== 'object' && error.subtype !== 'error')) {
return null;
}
@@ -366,9 +374,9 @@ export class SymbolizedError {
static async #lookupCause(
devTools: TargetUniverse | undefined,
- error: Protocol.Runtime.RemoteObject,
+ error: RemoteObjectLike,
targetId: string,
- ): Promise<Protocol.Runtime.RemoteObject | null> {
+ ): Promise<DevTools.Protocol.Runtime.RemoteObject | null> {
if (!devTools || (error.type !== 'object' && error.subtype !== 'error')) {
return null;
}
@@ -414,7 +422,7 @@ export async function createStackTraceForConsoleMessage(
export async function createStackTrace(
devTools: TargetUniverse,
- rawStackTrace: Protocol.Runtime.StackTrace,
+ rawStackTrace: StackTraceLike,
targetId: string | undefined,
): Promise<DevTools.StackTrace.StackTrace.StackTrace> {
const targetManager = devTools.universe.context.get(DevTools.TargetManager);
@@ -428,12 +436,12 @@ export async function createStackTrace(
// work in the MCP case, so we'll collect all script IDs upfront and wait for any pending source map
// loads before creating the stack trace. We might also have to wait for Debugger.ScriptParsed events if
// the stack trace is created particularly early.
- const scriptIds = new Set<Protocol.Runtime.ScriptId>();
+ const scriptIds = new Set<string>();
for (const frame of rawStackTrace.callFrames) {
scriptIds.add(frame.scriptId);
}
for (
- let asyncStack = rawStackTrace.parent;
+ let asyncStack: StackTraceLike | undefined = rawStackTrace.parent;
asyncStack;
asyncStack = asyncStack.parent
) {
@@ -468,7 +476,7 @@ export async function createStackTrace(
// Waits indefinitely for the script so pair it with Promise.race.
async function waitForScript(
model: DevTools.DebuggerModel,
- scriptId: Protocol.Runtime.ScriptId,
+ scriptId: string,
signal: AbortSignal,
) {
while (true) {
diff --git a/third_party/devtools-frontend b/third_party/devtools-frontend
index 9b6645d1..717509a4 160000
--- a/third_party/devtools-frontend
+++ b/third_party/devtools-frontend
@@ -1 +1 @@
-Subproject commit 9b6645d16f95b2cd441aab609b53ec7d9d5fef81
+Subproject commit 717509a45bfc11f9d7c5f0453ebe48761ef18bae