First-run page rearchitecturing complete · 2015-01-08 13:39 by Wladimir Palant
Ever since the Firefox nightly builds switched on E10S (multi-process) the Adblock Plus first-run page was broken. We noticed the issue mid-December last year and were working on a solution since then. The result was a completely different backend for the first-run page, one that will hopefully be used for the other pieces of the user interface as well soon (no urgency there however). The new first-run page in Adblock Plus 188.8.131.5284 for Firefox and Adblock Plus 184.108.40.2069 for Chrome, Opera and Safari should hopefully look and behave exactly the same as the old one. It should however be functional in the current Firefox nightlies with E10S switched on and perform better in Safari.
If you want to test the first-run page without reinstalling, you can copy
chrome://adblockplus/content/ui/firstRun.html into the address bar in Firefox or
chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/firstRun.html in Chrome and Opera. The idea is to have an Adblock Plus for Firefox release on January 14, 2015.
The technical details (feel free to skip): The first-run page used to access extension code directly. This was easy in Firefox and Chrome but turned out rather problematic in Safari. Safari extension pages can communicate with the main extension code only via messaging, and so we had to implement proxy objects that would fake direct access by means of synchronous messaging (not unlike Mozilla’s CPOWs). While synchronous messaging is convenient, it has the disadvantage of degrading performance.
With E10S the first-run page no longer runs in the same process as the rest of the extension. Essentially, we now have the same issue in Firefox that we only had in Safari before. So we decided to solve it properly this time, and make the first-run page use asynchronous messaging explicitly rather than relying on the ability to access the extension code directly. While at it, we decided to move the first-run page into the new adblockplusui repository – until now it was still living in the repository containing Adblock Plus for Firefox code, and forced our other products (especially Adblock Plus for Chrome, Opera and Safari) to depend on Adblock Plus for Firefox.
This has been implemented, and the first-run page can even be tested separately of Adblock Plus now. The adblockplusui repository contains a fake implementation of some Adblock Plus data structure, which allows the first-run page to be opened like a regular webpage.
Commenting is closed for this article.