mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1038245 - Add multiprocess field to about:support (r=felipe)
This commit is contained in:
parent
4da3783e52
commit
9350ee993b
@ -39,6 +39,7 @@ let snapshotFormatters = {
|
||||
if (data.vendor)
|
||||
version += " (" + data.vendor + ")";
|
||||
$("version-box").textContent = version;
|
||||
$("multiprocess-box").textContent = data.numRemoteWindows + "/" + data.numTotalWindows;
|
||||
},
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
@ -163,6 +163,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="column">
|
||||
&aboutSupport.appBasicsMultiProcessSupport;
|
||||
</th>
|
||||
|
||||
<td id="multiprocess-box">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -54,6 +54,8 @@ Windows/Mac use the term "Folder" instead of "Directory" -->
|
||||
<!ENTITY aboutSupport.appBasicsUserAgent "User Agent">
|
||||
<!ENTITY aboutSupport.appBasicsMemoryUse "Memory Use">
|
||||
|
||||
<!ENTITY aboutSupport.appBasicsMultiProcessSupport "Multiprocess Windows">
|
||||
|
||||
<!ENTITY aboutSupport.showDir.label "Open Directory">
|
||||
<!-- LOCALIZATION NOTE (aboutSupport.showMac.label): This is the Mac-specific
|
||||
variant of aboutSupport.showDir.label. This allows us to use the preferred
|
||||
|
@ -145,6 +145,22 @@ let dataProviders = {
|
||||
data.supportURL = urlFormatter.formatURLPref("app.support.baseURL");
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
data.numTotalWindows = 0;
|
||||
data.numRemoteWindows = 0;
|
||||
let winEnumer = Services.ww.getWindowEnumerator("navigator:browser");
|
||||
while (winEnumer.hasMoreElements()) {
|
||||
data.numTotalWindows++;
|
||||
let remote = winEnumer.getNext().
|
||||
QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIWebNavigation).
|
||||
QueryInterface(Ci.nsILoadContext).
|
||||
useRemoteTabs;
|
||||
if (remote) {
|
||||
data.numRemoteWindows++;
|
||||
}
|
||||
}
|
||||
|
||||
done(data);
|
||||
},
|
||||
|
||||
|
@ -98,6 +98,12 @@ const SNAPSHOT_SCHEMA = {
|
||||
supportURL: {
|
||||
type: "string",
|
||||
},
|
||||
numTotalWindows: {
|
||||
type: "number",
|
||||
},
|
||||
numRemoteWindows: {
|
||||
type: "number",
|
||||
},
|
||||
},
|
||||
},
|
||||
crashes: {
|
||||
|
Loading…
Reference in New Issue
Block a user