MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / constructor

Method constructor

src/adapter/source.ts:89–108  ·  view source on GitHub ↗

* @param inlineScriptOffset Offset of the start location of the script in * its source file. This is used on scripts in HTML pages, where the script * is nested in the content. * @param contentHash Optional hash of the file contents. This is used to * check whether the script we get is t

(
    container: SourceContainer,
    public readonly url: string,
    absolutePath: string | undefined,
    contentGetter: ContentGetter,
    sourceMapMetadata?: ISourceMapMetadata,
    public readonly inlineScriptOffset?: InlineScriptOffset,
    public readonly runtimeScriptOffset?: InlineScriptOffset,
    public readonly contentHash?: string,
  )

Source from the content-addressed store, hash-verified

87 * not be shown to the user.
88 */
89 constructor(
90 container: SourceContainer,
91 public readonly url: string,
92 absolutePath: string | undefined,
93 contentGetter: ContentGetter,
94 sourceMapMetadata?: ISourceMapMetadata,
95 public readonly inlineScriptOffset?: InlineScriptOffset,
96 public readonly runtimeScriptOffset?: InlineScriptOffset,
97 public readonly contentHash?: string,
98 ) {
99 this.sourceReference = container.getSourceReference(url);
100 this._contentGetter = once(contentGetter);
101 this._container = container;
102 this.absolutePath = absolutePath || '';
103 this._fqname = this._fullyQualifiedName();
104 this._name = this._humanName();
105 this.setSourceMapUrl(sourceMapMetadata);
106
107 this._existingAbsolutePath = this.checkContentHash(contentHash);
108 }
109
110 /** Returns the absolute path if the conten hash matches. */
111 protected checkContentHash(contentHash?: string) {

Callers

nothing calls this directly

Calls 6

_fullyQualifiedNameMethod · 0.95
_humanNameMethod · 0.95
setSourceMapUrlMethod · 0.95
checkContentHashMethod · 0.95
onceFunction · 0.90
getSourceReferenceMethod · 0.80

Tested by

no test coverage detected