Closed
Bug 704973
Opened 13 years ago
Closed 13 years ago
XPIProvider syncGUID setter should not always call to database
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(1 file)
3.90 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
According to :Mossop, XPIProvider.syncGUID's setter isn't implemented properly: It should support setting syncGUID to instances not yet backed by the database.
In addition, we need to set syncGUID earlier in an object's lifetime, preferably as soon as possible, so it is available to all listeners.
Comment 1•13 years ago
|
||
Basically you want to check |if (aAddon instanceof DBAddonInternal)| before attempting to push the ID to the database.
You can probably just create the syncGUID in loadManifestFromRDF or something, then it'd always be set.
Assignee | ||
Comment 2•13 years ago
|
||
This implements what was talked about in the first few comments.
1) Moved syncGUID generation to earlier in the object creation process
2) Don't always hit the DB when setting the syncGUID
I've verified that xpcshell and mochitests all pass.
Comment 3•13 years ago
|
||
Comment on attachment 578930 [details] [diff] [review]
syncGUID follow-up, v1
Review of attachment 578930 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/mozapps/extensions/XPIProvider.jsm
@@ +7628,5 @@
> return val;
>
> + if (aAddon instanceof DBAddonInternal) {
> + XPIDatabase.setAddonSyncGUID(aAddon, val);
> + }
No braces needed around a single statement here.
Attachment #578930 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Pushed to s-c with minor formatting change.
https://hg.mozilla.org/services/services-central/rev/91881c0cf3f3
Status: ASSIGNED → NEW
Assignee | ||
Comment 5•13 years ago
|
||
Pushed to m-c: https://hg.mozilla.org/mozilla-central/rev/91881c0cf3f3
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in
before you can comment on or make changes to this bug.
Description
•