Bug 1559234 - Add frame process ID to 'This Frame' submenu in context-menu. r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D35673
This commit is contained in:
Abdoulaye O. Ly
2019-06-26 16:33:57 +00:00
parent e1638afcc7
commit db0dedb958
4 changed files with 48 additions and 13 deletions

View File

@@ -525,6 +525,13 @@ nsContextMenu.prototype = {
this.onTextInput && this.onKeywordField);
this.showItem("frame", this.inFrame);
if (this.inFrame) {
// To make it easier to debug the browser running with out-of-process iframes, we
// display the process PID of the iframe in the context menu for the subframe.
let frameOsPid = this.actor.manager.browsingContext.currentWindowGlobal.osPid;
this.setItemAttr("context-frameOsPid", "label", "PID: " + frameOsPid);
}
let showSearchSelect = !this.inAboutDevtoolsToolbox &&
(this.isTextSelected || this.onLink) && !this.onImage;
this.showItem("context-searchselect", showSearchSelect);