Closed
Bug 1256602
Opened 9 years ago
Closed 8 years ago
Better async API for `outerWindowID`
Categories
(Core :: DOM: Content Processes, defect)
Tracking
()
RESOLVED
INCOMPLETE
| Tracking | Status | |
|---|---|---|
| e10s | + | --- |
People
(Reporter: sergei, Unassigned)
References
Details
(Whiteboard: btpp-backlog, triaged)
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36
Steps to reproduce:
To reproduce the bug one can try the following code in the Browser console:
let browser = window.getBrowser();
let tab = browser.addTab("about:blank");
console.log(tab.linkedBrowser.outerWindowID);
setTimeout(function(){console.log(tab.linkedBrowser.outerWindowID);}, 20);
JIC, in my extension the code is executed in chrome process and `window` is `Services.wm.getMostRecentWindow("navigator:browser");`.
Actual results:
Actual results:
In e10s `tab.linkedBrowser.outerWindowID` is firstly `null` however after some delay (~20msec on my machine) it is initialized to the actual number (e.g. 2147483652).
In FF 45 `tab.linkedBrowser.outerWindowID` is always already initialized to some number.
Expected results:
Expected results:
`tab.linkedBrowser.outerWindowID` should be already initialized to the actual number after the returning from `browser.addTab("about:blank")`.
Generally speaking it may be not an issue that it is initialized in a background however what is the reliable way to be notified when it's ready in that case?
Has STR: --- → yes
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Updated•9 years ago
|
Component: Untriaged → XPCOM
Product: Firefox → Core
Comment 1•9 years ago
|
||
Hey sergz,
When the remote browser is loaded, it sends a sync "Browser:Init" message up to the parent to inform the parent of the outerWindowId.
In the future, we might want to add some code to browser.xml / remote-browser.xml that returns a Promise that resolves when the outerWindowId is available, but for now, you can maybe work around this by listening for the Browser:Init message on the browser that has opened.
Blocks: e10s-addons
Updated•9 years ago
|
tracking-e10s:
--- → +
Updated•9 years ago
|
Component: XPCOM → DOM: Content Processes
Comment 2•9 years ago
|
||
Mike, I'm marking this as "backlog" but if you think it'll be fixed in the new few months, feel free to mark it as "fixlater" or even "fixnow".
Summary: `outerWindowID` of a newly created tab is initialized with some delay in e10s → Better async API for `outerWindowID`
Whiteboard: btpp-backlog
Updated•9 years ago
|
Whiteboard: btpp-backlog → btpp-backlog, triaged
(In reply to Mike Conley (:mconley) - (needinfo me!) from comment #1)
> When the remote browser is loaded, it sends a sync "Browser:Init" message up
> to the parent to inform the parent of the outerWindowId.
That works good, thanks a lot.
Comment 4•8 years ago
|
||
With Firefox 57 only WebExtensions are permitted and are, by default, e10s compatible.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•