Closed
Bug 1133568
Opened 11 years ago
Closed 10 years ago
[e10s] Any keypresses after findbar has been opened in a remote browser causes "unsafe CPOW usage"
Categories
(Toolkit :: Find Toolbar, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1133981
Tracking | Status | |
---|---|---|
e10s | m7+ | --- |
People
(Reporter: mconley, Unassigned)
References
Details
STR:
1) In an e10s window, open any page that has a <textarea> or <input type="text">.
2) Open the find bar (Cmd-F on OS X, Ctrl-F elsewhere), and then close it again (Esc).
3) Start typing into one of the text inputs.
For each keypress, a ton of "unsafe CPOW usage" messages get sent through the Browser Console.
They're centered around two pieces of code:
from toolkit/modules/BrowserUtils.jsm:
/**
* Return the current focus element and window. If the current focus
* is in a content process, then this function returns CPOWs
* (cross-process object wrappers) that refer to the focused
* items. Note that calling this function synchronously contacts the
* content process, which may block for a long time.
*
* @param document The document in question.
* @return [focusedElement, focusedWindow]
*/
getFocusSync: function(document) {
let elt = document.commandDispatcher.focusedElement;
var window = document.commandDispatcher.focusedWindow;
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
if (elt instanceof window.XULElement &&
elt.localName == "browser" &&
elt.namespaceURI == XUL_NS &&
elt.getAttribute("remote")) {
[elt, window] = elt.syncHandler.getFocusedElementAndWindow(); <-- Causes CPOW warning
}
return [elt, window];
},
From toolkit/content/widgets/findbar.xml:
<method name="_shouldFastFind">
<parameter name="aEvent"/>
<body><![CDATA[
if (aEvent.ctrlKey || aEvent.altKey || aEvent.metaKey ||
aEvent.defaultPrevented)
return false;
let {BrowserUtils} = Components.utils.import("resource://gre/modules/BrowserUtils.jsm", {});
let [elt, win] = BrowserUtils.getFocusSync(document);
if (elt) {
if (elt instanceof HTMLInputElement && elt.mozIsTextField(false)) <-- Causes CPOW warning
return false;
if (elt.isContentEditable) <-- Causes CPOW warning
return false;
if (elt instanceof HTMLTextAreaElement || <-- Causes CPOW warning
elt instanceof HTMLSelectElement ||
elt instanceof HTMLObjectElement ||
elt instanceof HTMLEmbedElement)
return false;
}
Updated•10 years ago
|
Updated•10 years ago
|
Points: --- → 3
Flags: qe-verify-
Flags: firefox-backlog+
Comment 2•10 years ago
|
||
Yup.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(gijskruitbosch+bugs)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•