mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1349360 - Expose client-side source map service on toolbox. r=ochameau
This makes the new client-side mapping service available from the toolbox. Note that it's not actually _used_ from here yet, as that will happen in separately. MozReview-Commit-ID: 5Bq774CANfC --HG-- extra : rebase_source : f29c2e76ca4fa087e05c192fbb6e12b6fead509e
This commit is contained in:
parent
f4ba137a1e
commit
d10b2af69a
@ -525,6 +525,23 @@ Toolbox.prototype = {
|
||||
return this.browserRequire("devtools/client/framework/components/toolbox-controller");
|
||||
},
|
||||
|
||||
/**
|
||||
* A common access point for the client-side mapping service for source maps that
|
||||
* any panel can use.
|
||||
*/
|
||||
get sourceMapService() {
|
||||
if (!Services.prefs.getBoolPref("devtools.source-map.client-service.enabled")) {
|
||||
return null;
|
||||
}
|
||||
if (this._sourceMapService) {
|
||||
return this._sourceMapService;
|
||||
}
|
||||
// Uses browser loader to access the `Worker` global.
|
||||
this._sourceMapService =
|
||||
this.browserRequire("devtools/client/shared/source-map/index");
|
||||
return this._sourceMapService;
|
||||
},
|
||||
|
||||
// Return HostType id for telemetry
|
||||
_getTelemetryHostId: function () {
|
||||
switch (this.hostType) {
|
||||
@ -2271,6 +2288,11 @@ Toolbox.prototype = {
|
||||
this._deprecatedServerSourceMapService = null;
|
||||
}
|
||||
|
||||
if (this._sourceMapService) {
|
||||
this._sourceMapService.destroyWorker();
|
||||
this._sourceMapService = null;
|
||||
}
|
||||
|
||||
if (this.webconsolePanel) {
|
||||
this._saveSplitConsoleHeight();
|
||||
this.webconsolePanel.removeEventListener("resize",
|
||||
|
@ -308,6 +308,9 @@ pref("devtools.webconsole.new-frontend-enabled", false);
|
||||
// https://docs.google.com/document/d/19TKnMJD3CMBzwByNE4aBBVWnl-AEan8Sf4hxi6J-eps/edit
|
||||
pref("devtools.source-map.locations.enabled", false);
|
||||
|
||||
// Enable client-side mapping service for source maps
|
||||
pref("devtools.source-map.client-service.enabled", true);
|
||||
|
||||
// The number of lines that are displayed in the web console.
|
||||
pref("devtools.hud.loglimit", 1000);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user