Skip to content

Commit e1ba555

Browse files
paulirishDevtools-frontend LUCI CQ
authored andcommitted
RPP: More comments around url/sourceURL
Bug: none Change-Id: I57aaba5299fa2a24cd64d17d9fadb8a96d74873e Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6920465 Commit-Queue: Paul Irish <[email protected]> Reviewed-by: Connor Clark <[email protected]> Auto-Submit: Paul Irish <[email protected]>
1 parent e269025 commit e1ba555

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

front_end/core/sdk/RehydratingObject.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type {SourceMapV3} from './SourceMap.js';
99
export interface RehydratingScript {
1010
scriptId: Protocol.Runtime.ScriptId;
1111
isolate: string;
12+
/** The script's `src` */
1213
url: string;
1314
executionContextId: Protocol.Runtime.ExecutionContextId;
1415
startLine: number;
@@ -19,6 +20,7 @@ export interface RehydratingScript {
1920
isModule?: boolean;
2021
hasSourceURL?: boolean;
2122
sourceMapURL?: string;
23+
/** The manually provided string via the `//# sourceURL` directive */
2224
sourceURL?: string;
2325
length?: number;
2426
sourceText?: string;

front_end/core/sdk/Script.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ let scriptCacheInstance: {
6868
export class Script implements TextUtils.ContentProvider.ContentProvider, FrameAssociated {
6969
debuggerModel: DebuggerModel;
7070
scriptId: Protocol.Runtime.ScriptId;
71+
/**
72+
* The URL of the script. When `hasSourceURL` is true, this value comes from a `//# sourceURL=` directive. Otherwise,
73+
* it's the original `src` URL from which the script was loaded.
74+
*/
7175
sourceURL: Platform.DevToolsPath.UrlString;
7276
lineOffset: number;
7377
columnOffset: number;

0 commit comments

Comments
 (0)