Bug 1038245 - Add multiprocess field to about:support (r=felipe)

This commit is contained in:
Bill McCloskey 2014-07-16 23:06:06 -07:00
parent 4da3783e52
commit 9350ee993b
5 changed files with 34 additions and 0 deletions

View File

@ -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

View File

@ -163,6 +163,15 @@
</td>
</tr>
<tr>
<th class="column">
&aboutSupport.appBasicsMultiProcessSupport;
</th>
<td id="multiprocess-box">
</td>
</tr>
</tbody>
</table>

View File

@ -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

View File

@ -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);
},

View File

@ -98,6 +98,12 @@ const SNAPSHOT_SCHEMA = {
supportURL: {
type: "string",
},
numTotalWindows: {
type: "number",
},
numRemoteWindows: {
type: "number",
},
},
},
crashes: {