/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
async getOriginalURLs(urlInfo) { try { return await this.#getOriginalURLs(urlInfo);
} catch (error) { // Note that tests may not pass the targetCommand if (this.#targetCommand) { // Catch all errors and log them to the Web Console for users to see. const message = L10N.getFormatStr( "toolbox.sourceMapFailure",
error,
urlInfo.url,
urlInfo.sourceMapURL
); this.#targetCommand.targetFront.logWarningInPage(message, "source map");
}
// And re-throw the error so that the debugger can also interpret the error throw error;
}
}
// Note that tests may not pass the targetCommand if (this.#targetCommand) { // Catch all errors and log them to the Web Console for users to see. this.#targetCommand.targetFront.logWarningInPage(message, "source map");
}
// Also replace the result with the error text. // Note that this result has to have the same form // as whatever the upstream getOriginalSourceText // returns. return {
text: message,
contentType: "text/plain",
};
}
}
// Notify and ensure waiting for the SourceMapURLService to process the source map before resolving. // Otherwise tests start failing because of pending request made by this component.
await this.emitAsync("source-map-created", generatedIds);
return rv;
}
destroy() { // Request to stop the underlying DOM Worker this.stop(); // Unregister all listeners this.clearEvents(); // SourceMapLoader may be leaked and so it is important to clear most outer references this.#targetCommand = null;
}
}
EventEmitter.decorate(SourceMapLoader.prototype);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.