зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1559409 - Show subframe pids in tab hover text, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D35029 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5993e555d3
Коммит
9033668540
|
@ -4288,8 +4288,20 @@ window._gBrowser = {
|
||||||
tab.linkedBrowser.frameLoader) {
|
tab.linkedBrowser.frameLoader) {
|
||||||
label += " (pid " + tab.linkedBrowser.frameLoader.remoteTab.osPid + ")";
|
label += " (pid " + tab.linkedBrowser.frameLoader.remoteTab.osPid + ")";
|
||||||
|
|
||||||
if (window.docShell.QueryInterface(Ci.nsILoadContext).useRemoteSubframes) {
|
// If we're running with fission enabled, try to include PID
|
||||||
label += " [F]";
|
// information for every remote subframe.
|
||||||
|
if (gFissionBrowser) {
|
||||||
|
let pids = new Set();
|
||||||
|
let stack = [tab.linkedBrowser.browsingContext];
|
||||||
|
while (stack.length) {
|
||||||
|
let bc = stack.pop();
|
||||||
|
stack.push(...bc.getChildren());
|
||||||
|
if (bc.currentWindowGlobal) {
|
||||||
|
pids.add(bc.currentWindowGlobal.osPid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
label += " [F " + Array.from(pids).join(", ") + "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ interface WindowGlobalParent {
|
||||||
readonly attribute unsigned long long outerWindowId;
|
readonly attribute unsigned long long outerWindowId;
|
||||||
readonly attribute unsigned long long contentParentId;
|
readonly attribute unsigned long long contentParentId;
|
||||||
|
|
||||||
|
readonly attribute long osPid;
|
||||||
|
|
||||||
// A WindowGlobalParent is the root in its process if it has no parent, or its
|
// A WindowGlobalParent is the root in its process if it has no parent, or its
|
||||||
// embedder is in a different process.
|
// embedder is in a different process.
|
||||||
readonly attribute boolean isProcessRoot;
|
readonly attribute boolean isProcessRoot;
|
||||||
|
|
|
@ -156,6 +156,11 @@ uint64_t WindowGlobalParent::ContentParentId() {
|
||||||
return browserParent ? browserParent->Manager()->ChildID() : 0;
|
return browserParent ? browserParent->Manager()->ChildID() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t WindowGlobalParent::OsPid() {
|
||||||
|
RefPtr<BrowserParent> browserParent = GetBrowserParent();
|
||||||
|
return browserParent ? browserParent->Manager()->Pid() : -1;
|
||||||
|
}
|
||||||
|
|
||||||
// A WindowGlobalPaernt is the root in its process if it has no parent, or its
|
// A WindowGlobalPaernt is the root in its process if it has no parent, or its
|
||||||
// embedder is in a different process.
|
// embedder is in a different process.
|
||||||
bool WindowGlobalParent::IsProcessRoot() {
|
bool WindowGlobalParent::IsProcessRoot() {
|
||||||
|
|
|
@ -94,6 +94,8 @@ class WindowGlobalParent final : public WindowGlobalActor,
|
||||||
|
|
||||||
uint64_t ContentParentId();
|
uint64_t ContentParentId();
|
||||||
|
|
||||||
|
int32_t OsPid();
|
||||||
|
|
||||||
bool IsCurrentGlobal();
|
bool IsCurrentGlobal();
|
||||||
|
|
||||||
bool IsProcessRoot();
|
bool IsProcessRoot();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче