e10s

General discussion about web technology.
Post Reply
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

e10s

Post by barbaz »

Could someone please point me to documentation for how to port existing addons to work with Gecko e10s multiprocess architecture (if such docs exist)? It seems there's nothing useful to that end on MDN. TIA
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 SeaMonkey/2.28
User avatar
therube
Ambassador
Posts: 7924
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: e10s

Post by therube »

No idea what might or might not be in (mozillazine) thread, Multiprocess Firefox [e10s].
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 SeaMonkey/2.26.1
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: e10s

Post by barbaz »

If I'm understanding correctly, it's only access / manipulation of content documents that's going to be affected (using some messaging system vs directly), and Mozilla is going to try to keep everything else working as-is?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 SeaMonkey/2.28
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: e10s

Post by Giorgio Maone »

For one, the widely used "content" property of chrome browser window won't work at all.
Been there, done that for NSA, before they dropped E10s from Fennec.
Notice that NSA++ still has all its message manager machinery in place.

This document may help you.
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
DJ-Leith
Senior Member
Posts: 149
Joined: Thu Aug 04, 2011 4:23 pm

Re: e10s

Post by DJ-Leith »

I'm very happy to run several instances of Firefox, each with their
own NoScript (and other add-ons, including RequestPolicy), at the
same time. This allows me to avoid many of the issues with e10s.

Code: Select all

[e10s] "NoScript" add-on does not work with e10s
https://bugzilla.mozilla.org/show_bug.cgi?id=1058542

For RequestPolicy see
https://bugzilla.mozilla.org/show_bug.cgi?id=946739


Are we e10s yet?
http://arewee10syet.com/
This site is for testing add-ons with e10s.

See the 2nd post in this thread
The Official Win32 20140826 builds are out
http://forums.mozillazine.org/viewtopic ... &t=2863427

Where Omega X said:
"The e10s team is asking everyone to dogfood their first milestone of e10s."
Chris Peterson wrote: The e10s team has completed our M1 milestone to fix major pain points for dogfood testing. Now it's time to dogfood!

To enable e10s, flip the "browser.tabs.remote.autostart" pref to true and restart Nightly. If you have any problems or questions, drop by the #e10s channel on IRC.

PLEASE read this list of known issues you are likely to hit:

https://etherpad.mozilla.org/e10s-known-issues

If you file e10s bugs, please include the word "e10s" in the summary and/or set the "tracking-e10s" flag to '?' to ensure your bugs get triaged.

For a list of tested add-ons (compatible, incompatible, and popular add-ons we'd like people to test), see:

http://arewee10syet.com


thanks!
chris
DJ-Leith
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: e10s

Post by barbaz »

@DJ-Leith: Thanks, but I make a lot of addons myself for personal use and don't publish them anywhere, and this topic was about how I could make those addons compatible with e10s. So arewee10syet wouldn't ever have heard of these addons; and waiting around, filing Mozilla bugs, or trying to ignore e10s won't help. It's on me to deal with it.

Some bugs have surfaced recently on one of my addons (which I think does access content), I'll take the opportunity to see if it can play nice with the message manager.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 SeaMonkey/2.28
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: e10s

Post by barbaz »

Two questions:
1) Generally, I like my addons to work with/support Gecko 15 and later. What is the browser compatibility of the message manager?
I don't think I can answer that question just by trying it because if it doesn't work, I won't know if that's because there isn't a message manager, if there's a bug that has since been fixed, or if it means that the APIs have changed since Gecko 15.

2)
https://bugzilla.mozilla.org/show_bug.cgi?id=1017320 wrote:Calling Services.obs.addObserver(..., "content-document-global-created", ...) will send a message to the child asking it to forward these observer notifications to the parent, similar to above.
Some of my addons make heavy use of observer notifications like content-document-global-created and document-element-inserted. I'm not clear what the bug is saying about those notifications, and I don't want my addons to rely on temporary shims. Will these observer notifications still be available and working well *without* shims, will I need to register the observer in a frame script instead, or...?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 SeaMonkey/2.28
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: e10s

Post by barbaz »

barbaz wrote:1) Generally, I like my addons to work with/support Gecko 15 and later. What is the browser compatibility of the message manager?
I don't think I can answer that question just by trying it because if it doesn't work, I won't know if that's because there isn't a message manager, if there's a bug that has since been fixed, or if it means that the APIs have changed since Gecko 15.
Well, I found the time to "just try it" anyway, with a test addon, and the situation is looking really bad... I got it working in my custom build of SeaMonkey 2.29.1, but any attempt to access the window message manager in Firefox at least up to 28 (which is all I would care about in terms of Fx compatibility) fails in the worst way: it makes the message manager undefined and consequently borks the browser :?:

Looking at where the browser code borks, seems like the message manager is supposed to be available in at least Firefox >= 13 :?: :?:

This is code that's basically copied straight off of the MDN document Giorgio linked, with what should be a safety catch for the case where window.messageManager is undefined, so if the message manager works, my test addon should work; if there's no message manager, it should do nothing.
Also the addon is being run in a clean profile with no other addons installed, so there isn't any profile corruption or extension conflict occurring.

Any work around for that weird failure?
(Giorgio, how did you work around that in NSA?? I'm unable to figure it out looking at the references to win.messageManager in the source.)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (compatible; rv:17.1) Gecko/20603306 Firefox/17.1
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: e10s

Post by barbaz »

Wow, I'm brain dead. :roll:
The window message manager works fine in Firefox 13.0.1 if I call the message manager and do the set up all from a chrome window load event listener.

Sorry for the crazy post, but I'm leaving it in case it's a useful heads up for others who want to make e10s-compatible addons. :oops:
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (compatible; rv:17.1) Gecko/20603306 Firefox/17.1
Post Reply