Closed Bug 883928 Opened 8 years ago Closed 7 years ago

Firefox 23: Components.classes["@mozilla.org/dom/storagemanager;1"] is undefined

Categories

(Core :: DOM: Core & HTML, defect)

23 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla25
Tracking Status
firefox23 + verified
firefox24 + verified
firefox25 --- verified

People

(Reporter: Omar_Hawk, Assigned: mayhemer)

References

Details

(Keywords: addon-compat, dev-doc-needed, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803

Steps to reproduce:

In my AddOn, I use the Components.classes["@mozilla.org/dom/storagemanager;1"] as described here:
https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/NsIDOMStorageManager


Actual results:

The line 
var dsm = Components.classes["@mozilla.org/dom/storagemanager;1"]
                        .getService(Components.interfaces.nsIDOMStorageManager);
in my AddOn code throws a TypeError, since Components.classes["@mozilla.org/dom/storagemanager;1"] is undefined for some reasons.


Expected results:

Components.classes["@mozilla.org/dom/storagemanager;1"] shouldn't be undefined, or the change should be documented somewhere, so AddOn developers know, that they should use either "@mozilla.org/dom/localStorage-manager;1"  or "@mozilla.org/dom/sessionStorage-manager;1" instead of "@mozilla.org/dom/storagemanager;1" from now on.
Regression winodw(m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/41bb93c802d1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130415 Firefox/23.0 ID:20130415170023
Bad:
http://hg.mozilla.org/mozilla-central/rev/1d9c510b3742
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130415 Firefox/23.0 ID:20130415185024
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=41bb93c802d1&tochange=1d9c510b3742



Regression winodw(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/644f16c3f87c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130415 Firefox/23.0 ID:20130415053103
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/626f981f90e6
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130415 Firefox/23.0 ID:20130415054102
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=644f16c3f87c&tochange=626f981f90e6

Regressed by: Bug 600307
Blocks: 600307
Component: Untriaged → DOM: Core & HTML
Keywords: regression
Product: Firefox → Core
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: addon-compat
(In reply to Jeferson Hultmann from comment #2)
> dev-doc-needed => Here is how I updated my extension:
> https://github.com/hultmann/multifox/commit/
> 12b65e9009eab60932edcaff9e333b18233f431d

It is correct.  Seems like I forgot to put the dev-doc-needed keyword to the original rewrite bug (600307).  The method of the old manager however remains in the interface.

If this appears more often, we can re-add "@mozilla.org/dom/storagemanager;1" to the ContracID list.  It could also be easily uplifted.
This is confirmed, my add-on is affected.

Breaking APIs like this is unacceptable behavior, people.
(In reply to Honza Bambas (:mayhemer) from comment #3)
> (In reply to Jeferson Hultmann from comment #2)
> > dev-doc-needed => Here is how I updated my extension:
> > https://github.com/hultmann/multifox/commit/
> > 12b65e9009eab60932edcaff9e333b18233f431d
> 
> It is correct.  Seems like I forgot to put the dev-doc-needed keyword to the
> original rewrite bug (600307).  The method of the old manager however
> remains in the interface.
> 
> If this appears more often, we can re-add
> "@mozilla.org/dom/storagemanager;1" to the ContracID list.  It could also be
> easily uplifted.

Since we're going to Beta with FF23 on Monday, let's do the uplift and make sure we don't break addon compat in 23.  Leave it out of 24 again if you like, and once the docs are updated.
Attached patch v1Splinter Review
Here should be soon a build to try extension with:

https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/honzab.moz@firemni.cz-2f7a7dbd9351/
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #766277 - Flags: review?(jonas)
Attachment #766277 - Flags: review?(jonas) → review+
Thank you guys!
https://hg.mozilla.org/mozilla-central/rev/e92898159905
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
@Jan Wedding, this should now be fixed in Firefox 23, 24, and 25. Can you please confirm?
Flags: needinfo?(Omar_Hawk)
I can confirm. Tested with Firefox 23, 24, and 25 (currenty versions for each). Thanks a lot. :)
Flags: needinfo?(Omar_Hawk)
Thank you for your help Jan.
You need to log in before you can comment on or make changes to this bug.