mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1480593 - Allow setting a different instance of perf.html for the new performance panel, using a pref r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D8869 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e5856b4cf7
commit
9c1ba92750
@ -7,6 +7,8 @@ const Services = require("Services");
|
||||
const TRANSFER_EVENT = "devtools:perf-html-transfer-profile";
|
||||
const SYMBOL_TABLE_REQUEST_EVENT = "devtools:perf-html-request-symbol-table";
|
||||
const SYMBOL_TABLE_RESPONSE_EVENT = "devtools:perf-html-reply-symbol-table";
|
||||
const UI_BASE_URL_PREF = "devtools.performance.recording.ui-base-url";
|
||||
const UI_BASE_URL_DEFAULT = "https://perf-html.io";
|
||||
|
||||
/**
|
||||
* This file contains all of the privileged browser-specific functionality. This helps
|
||||
@ -37,7 +39,8 @@ function receiveProfile(profile, getSymbolTableCallback) {
|
||||
const browser = win.gBrowser;
|
||||
Services.focus.activeWindow = win;
|
||||
|
||||
const tab = browser.addWebTab("https://perf-html.io/from-addon", {
|
||||
const baseUrl = Services.prefs.getStringPref(UI_BASE_URL_PREF, UI_BASE_URL_DEFAULT);
|
||||
const tab = browser.addWebTab(`${baseUrl}/from-addon`, {
|
||||
triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({
|
||||
userContextId: browser.contentPrincipal.userContextId,
|
||||
}),
|
||||
|
@ -140,6 +140,13 @@ pref("devtools.performance.ui.experimental", true);
|
||||
pref("devtools.performance.ui.experimental", false);
|
||||
#endif
|
||||
|
||||
// Preferences for the new performance panel
|
||||
// This pref configures the base URL for the perf.html instance to use. This is
|
||||
// useful so that a developer can change it while working on perf.html, or in
|
||||
// tests.
|
||||
// This isn't exposed directly to the user.
|
||||
pref("devtools.performance.recording.ui-base-url", "https://perf-html.io");
|
||||
|
||||
// The default cache UI setting
|
||||
pref("devtools.cache.disabled", false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user