зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1349363 - Use a centralized function to tell if e10s-multi is on. r=Felipe
MozReview-Commit-ID: JQJtCanIv3a --HG-- extra : rebase_source : e459489211499ccc65b3b834ed0ec4e4d751994e
This commit is contained in:
Родитель
4cff489478
Коммит
c0d02b25be
|
@ -4898,7 +4898,7 @@
|
|||
tab.linkedBrowser &&
|
||||
tab.linkedBrowser.isRemoteBrowser) {
|
||||
label += " - e10s";
|
||||
if (Services.prefs.getIntPref("dom.ipc.processCount") > 1) {
|
||||
if (Services.appinfo.maxWebProcessCount > 1) {
|
||||
label += " (" + tab.linkedBrowser.frameLoader.tabParent.osPid + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ loader.lazyRequireGetter(this, "DebuggerClient",
|
|||
"devtools/shared/client/main", true);
|
||||
|
||||
const Strings = Services.strings.createBundle("chrome://devtools/locale/aboutdebugging.properties");
|
||||
const PROCESS_COUNT_PREF = "dom.ipc.processCount";
|
||||
const MULTI_OPT_OUT_PREF = "dom.ipc.multiOptOut";
|
||||
|
||||
module.exports = createClass({
|
||||
displayName: "multiE10SWarning",
|
||||
|
@ -28,7 +28,9 @@ module.exports = createClass({
|
|||
onUpdatePreferenceClick() {
|
||||
let message = Strings.GetStringFromName("multiProcessWarningConfirmUpdate");
|
||||
if (window.confirm(message)) {
|
||||
Services.prefs.setIntPref(PROCESS_COUNT_PREF, 1);
|
||||
// Disable multi until at least the next experiment.
|
||||
Services.prefs.setIntPref(MULTI_OPT_OUT_PREF,
|
||||
Services.appinfo.E10S_MULTI_EXPERIMENT);
|
||||
// Restart the browser.
|
||||
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,9 @@ module.exports = createClass({
|
|||
},
|
||||
|
||||
updateMultiE10S() {
|
||||
let processCount = Services.prefs.getIntPref(PROCESS_COUNT_PREF);
|
||||
// We watch the pref but set the state based on
|
||||
// nsIXULRuntime::maxWebProcessCount.
|
||||
let processCount = Services.appinfo.maxWebProcessCount;
|
||||
this.setState({ processCount });
|
||||
},
|
||||
|
||||
|
|
|
@ -7,9 +7,6 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
|||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import('resource://gre/modules/Services.jsm');
|
||||
|
||||
const BASE_PREF = "dom.ipc.processCount"
|
||||
const PREF_BRANCH = BASE_PREF + ".";
|
||||
|
||||
// Fills up aProcesses until max and then selects randomly from the available
|
||||
// ones.
|
||||
function RandomSelector() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче