Opened on 03/29/2017 at 10:02:46 AM

Closed on 04/11/2017 at 09:30:42 AM

Last modified on 05/23/2017 at 11:23:27 AM

#5050 closed change (fixed)

Make legacy extension use WebExtensions I/O

Reported by: trev Assignee: trev
Priority: P2 Milestone: Adblock-Plus-2.9-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: wspee Blocked By:
Blocking: #5048 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29408710/

Description (last modified by trev)

Background

We need to migrate data from our legacy extension to a place where it will be usable by the WebExtensions build.

What to change

Embed a WebExtension in our legacy extension providing an I/O interface compatible with the WebExtension build. Make io.js in the legacy part message the WebExtension part by default.

In order to allow access to already existing files, the original io.js should be preserved as legacyIO.js. All I/O calls (with the exception of IO.writeFile) should fall back to the legacy I/O if the file isn't found.

chrome/content/ui/filters-backup.js should generally use legacyIO.js for file access.

Hints for testers

Originally, our data was stored in adblockplus/ directory in the Firefox profile. The new location is browser-extension-data/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/storage.js which contains all files we used to store in the directory before. If the new storage.js doesn't exist, Adblock Plus should fall back to the old data automatically - there should be no first-run page on update, and all the data (old automatic backups included) should still be intact. We are *not* importing the backups into the new storage immediately. Instead, new automatic backups are created in storage.js and old backups will be phased out eventually. This means however that initially some backups will be in adblockplus/ directory whereas others will be inside storage.js - the user shouldn't notice that, all backups should work equally, appear in the same list in Filter Preferences and restoring any should work.

Attachments (0)

Change History (10)

comment:1 Changed on 03/29/2017 at 10:03:16 AM by trev

  • Blocking 5048 added

comment:2 Changed on 03/29/2017 at 10:24:53 AM by wspee

  • Cc wspee added

comment:3 Changed on 03/29/2017 at 01:09:24 PM by trev

  • Description modified (diff)

comment:4 Changed on 03/29/2017 at 01:09:48 PM by trev

  • Description modified (diff)

comment:5 Changed on 04/10/2017 at 10:23:21 AM by trev

  • Description modified (diff)

comment:6 Changed on 04/10/2017 at 11:40:58 AM by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:7 Changed on 04/11/2017 at 09:29:11 AM by abpbot

A commit referencing this issue has landed:
Issue 5050 - Make legacy extension use WebExtensions I/O

comment:8 Changed on 04/11/2017 at 09:30:42 AM by trev

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:9 Changed on 04/20/2017 at 01:06:04 PM by trev

  • Description modified (diff)

comment:10 Changed on 05/23/2017 at 11:23:27 AM by Ross

  • Verified working set

This appears to be working as expected. Data is kept when upgrading from last release -> migration legacy build -> WebExtension build. Falling back to use /adblockplus/ if needed appears to work as expected (data is there, no FRP appears).

ABP 2.8.2.4231
ABP 2.8.2.4244
ABP 2.8.2.4246
ABP 1.13.2.1773
Firefox 53 / Firefox Dev (54) / Windows 7

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from trev.
 
Note: See TracTickets for help on using tickets.