Closed Bug 1074463 Opened 10 years ago Closed 8 years ago

[e10s] "EPUBReader" add-on does not work with e10s

Categories

(Firefox :: Extension Compatibility, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s + ---

People

(Reporter: stephen.moehle, Unassigned)

References

Details

Cannot open an epub document using the EPUBReader add-on when e10s is enabled. If I try to open an epub from disk using the the file-open dialog or save one from a web page, I get a dialog with the title "Opening blah.epub" with the options "Open with Firefox (default)" and "Save File". If I use "Open with Firefox", I get a new tab and the same dialog again. I can repeat this endlessly.

If I disable e10s, I can open and view epub documents without problems.

EPUBReader 1.4.2.5
Firefox Nightly 20140929030205
Fedora 20 Linux, 64-bit
The developer has been notified through AMO.
My add-on listens for epub content. It kicks in if you open an epub file via the Firefox menu "File/File open" or if you click on an epub url on a webpage. For that reason it implements the    nsIContentSniffer, nsIStreamConverter, nsIStreamListener and nsIRequestObserver interfaces. The interface functions are included in a component.

With e10s enabled, in the case of "File/File open" I can see that none of the functions which implement the interfaces is called. When clicking on an epub link on a webpage just the getMIMETypeFromContent function of the nsIContentSniffer is called but none of the others.

I already tried to move the whole component code to a frame script but without success. In both cases (file open, click on link) none of the interface functions is called. Any hint, how this can be solved?
Ally: do you have any recommendations for which epub reader code should run in the chrome process or the content process? It sounds like the listeners for "File Open" and clicking an epub link should run in the chrome process, but any code for displaying epub content should be in a frame script in the content process.

testit, if you have any more questions about e10s support, just drop by the #e10s IRC channel on irc.mozilla.org or ask Ally on this bug. MDN also has a good introduction:

https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ally)
(In reply to Chris Peterson (:cpeterson) from comment #3)
> Ally: do you have any recommendations for which epub reader code should run
> in the chrome process or the content process? It sounds like the listeners
> for "File Open" and clicking an epub link should run in the chrome process,
> but any code for displaying epub content should be in a frame script in the
> content process.
> 
> testit, if you have any more questions about e10s support, just drop by the
> #e10s IRC channel on irc.mozilla.org or ask Ally on this bug. MDN also has a
> good introduction:
> 
> https://developer.mozilla.org/en-US/Add-ons/Working_with_multiprocess_Firefox

Thanks for the info. In the meantime I already solved the problem.
Testit, I would like to hear what your solution was.
Flags: needinfo?(ally)
(In reply to please NEEDINFO? :ally  Allison Naaktgeboren from comment #5)
> Testit, I would like to hear what your solution was.

I added the functions which implement the interfaces to a frame script and load it via global message manager.
(In reply to Jorge Villalobos [:jorgev] from comment #1)
> The developer has been notified through AMO.

I uploaded a new version which fixes the problems with e10s, but it is only preliminary reviewed. The reason given was that I use sync sql. The sql code is unchanged since version 1 which I released 5 years ago and nobody else complained before, so I don't understand why it's not fully reviewed.
I approved the update, but you need to fix the SQL issue soon. Thanks.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(In reply to Jorge Villalobos [:jorgev] from comment #8)
> I approved the update, but you need to fix the SQL issue soon. Thanks.

Thanks for approving. I uploaded a new version which is also preliminary reviewed because of sync sql. This version includes an urgent bugfix for a bug which was introduced by my e10s changes. As moving from sync to async sql is pretty much work, I had no time to include this in this version. It would be great, if you could approve this version too.
I thought my add-on would be e10s compatible because it was listed with this status on http://arewee10syet.com/. Now I see, that the status has changed there to "shimmed". What does this mean?
It means the add-on is possibly using compatibility shims to work: https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Limitations_of_chrome_scripts#Compatibility_shims

Setting the multiprocessCompatible flag in install.rdf should deactivate all shims, so you can make sure your add-on works without them.
(In reply to Jorge Villalobos [:jorgev] from comment #11)
> It means the add-on is possibly using compatibility shims to work:
> https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/
> Limitations_of_chrome_scripts#Compatibility_shims
> 
> Setting the multiprocessCompatible flag in install.rdf should deactivate all
> shims, so you can make sure your add-on works without them.

Thanks for the information. What do I need to do to get the status on http://arewee10syet.com/ changed if the add-on runs without problems in e10s mode?
I'm not sure if the "shimmed" status is set manually or automatically. If it's automatic, then I think it's just a matter of adding the multiprocessCompatible flag to install.rdf and submit a new version to AMO. Otherwise, someone will manually check your add-on and update the site eventually.
E10s Are We Ready...
Version 	48.0a1
Build ID 	20160322030417
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0
EPUBReader 1.5.0.8
Tested on Nightly > this fails regardless of E10s status. It is working in 45.0.1 

1. Access http://www.adobe.com/solutions/ebook/digital-editions/sample-ebook-library.html
2. Click a link "Download eBook" (http://contentserver.adobe.com/store/books/GeographyofBliss_oneChapter.epub)
Expect: the sample book is displayed in a new tab
Actual: a new blank tab is opened.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Michelle Funches - QA from comment #14)
Thanks for reporting this error, I'll check this. As you have written, this problem occurs regardless of E10s status, so this is a new bug. Please close this bug again.
Are We E10s Ready... Confirming this AddOn is working in Aurora. 
This bug will be closed as requested.
Version 	47.0a2
Build ID 	20160323004040
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.