mirror of
https://github.com/ChromeDevTools/chrome-devtools-mcp.git
synced 2026-09-14 19:45:30 +08:00
chore(deps): bump third_party/devtools-frontend from 9b6645d to 717509a (#2724)
Bumps [third_party/devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from `9b6645d` to `717509a`. Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Natasha Gorshunova <47688881+nattallius@users.noreply.github.com> Co-authored-by: Natallia Harshunova <nattallius@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Vendored
+1
-1
Submodule third_party/devtools-frontend updated: 9b6645d16f...717509a45b
Reference in New Issue
Block a user