Simple storage no longer purged on uninstall

RESOLVED FIXED in 0.4

Status

Add-on SDK
General
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: adw, Assigned: adw)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Same problem, two different roots:

1) The extension manager isn't notifying simple storage's AddonListener on onUninstalling (or onUninstalled) on Fx trunk (today's nightly).  When I go back to May 18's nightly [1], onUninstalling is called as expected.  Dave, know what's going on there?

2) After bug 566812 landed, self.id is no longer equal to the add-on ID.  (Bug 566812 comment 16 explains.)  Simple storage compares self.id to IDs given by the extension manager API to determine when the add-on using simple storage has been uninstalled.  These IDs are no longer equal, so as a result storage isn't purged on uninstall.

[1] http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2010-05-18-03-mozilla-central/
(Assignee)

Updated

8 years ago
Blocks: 548589
Summary: Simple storage no longer purged store on uninstall → Simple storage no longer purged on uninstall
(Assignee)

Comment 1

8 years ago
Created attachment 446647 [details] [diff] [review]
fix for root 2

This fixes root 2 given in comment 0.  A better long-term solution would be to provide both the JID and add-on ID in self or some other API, but if this can make 0.4 I think we should take it.  Note that until root 1 is fixed, the storage of add-ons running on trunk won't be purged even with this patch.
Attachment #446647 - Flags: review?(avarma)
Comment on attachment 446647 [details] [diff] [review]
fix for root 2

r=myk, and let's get this onto the trunk for inclusion into 0.4 forthwith.
Attachment #446647 - Flags: review?(avarma) → review+
(In reply to comment #0)
> Same problem, two different roots:
> 
> 1) The extension manager isn't notifying simple storage's AddonListener on
> onUninstalling (or onUninstalled) on Fx trunk (today's nightly).  When I go
> back to May 18's nightly [1], onUninstalling is called as expected.  Dave, know
> what's going on there?

I really don't, nothing suspect changed in the extension manager code in that time (there was only one change at all) so I'm surprised the event has stopped working
(Assignee)

Comment 4

8 years ago
Hmm, thanks Dave.  I'll continue to debug, and maybe I'm doing something wrong.

Fix for root 2 pushed: http://hg.mozilla.org/labs/jetpack-sdk/rev/dcc371c39a33

Until I figure out the first root cause I'll leave this bug open.
(Assignee)

Comment 5

8 years ago
Dave, when I remove a test (restartless/bootstrapped) extension immediately after installing it, I get notified.  If I restart the browser after installation and then uninstall, no notifications.
(Assignee)

Comment 6

8 years ago
And when I back out bug 566485, onUninstalling is called after restart and uninstall as expected.
Depends on: 567319
(Assignee)

Comment 7

8 years ago
Yay, I applied Dave's patch on bug 567319 and it works fine.  Since both root causes of this bug have been fixed, resolving fixed.  Thanks Dave.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: -- → 0.4
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.