Closed Bug 1312143 Opened 8 years ago Closed 8 years ago

Delete toolkit/obsolete

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

(Keywords: addon-compat)

Attachments

(1 file)

This is an obsolete interface used by addons. Per discussion on IRC we'd like to just go ahead and delete this.

As a bonus there's some nsISupportsArray usage in the directory, so we'd be getting rid of usage of that as well.
These interfaces have been deprecated for a very long time, so it should be safe to remove them at this point. A lot of add-ons still use a few of them, particularly nsUserSettings.js and strres.js, but fortunately most of them are not compatible with recent (or any) versions of Firefox.

The rest can easily be updated to use better alternatives like Preferences.jsm and and <stringbundle> nodes.
This removes 'toolkit/obsolete'. I'm not sure the best reviewer here, Kris feel free to redirect.

MozReview-Commit-ID: JZfi0W2wqCL
Attachment #8803579 - Flags: review?(kmaglione+bmo)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8803579 [details] [diff] [review]
Delete toolkit/obsolete

Review of attachment 8803579 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the lingering in-tree references fixed.

::: toolkit/obsolete/content/inlineSpellCheckUI.js
@@ -3,5 @@
> - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> -
> -Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
> -
> -var InlineSpellCheckerUI = new InlineSpellChecker();

This needs to be moved to browser.js, and then this file needs to be removed from global-scripts.inc, web-panels.xul, and import-browserjs-globals.js

::: toolkit/obsolete/jar.mn
@@ -3,5 @@
> -# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> -
> -toolkit.jar:
> -   content/global/globalOverlay.xul             (content/globalOverlay.xul)
> -*  content/global/dialogOverlay.xul             (content/dialogOverlay.xul)

It looks like dialogOverlay.xul is still used 3 places. cookieAcceptDialog.xul is dead code at this point, so it probably doesn't matter. printPreviewProgress.xul and printProgress.xul should just need the overlay removed and the top-level <window> changed to <dialog>.
Attachment #8803579 - Flags: review?(kmaglione+bmo) → review+
Thanks for the quick review!

(In reply to Kris Maglione [:kmag] from comment #3)
> Comment on attachment 8803579 [details] [diff] [review]
> Delete toolkit/obsolete
> 
> Review of attachment 8803579 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=me with the lingering in-tree references fixed.
> 
> ::: toolkit/obsolete/content/inlineSpellCheckUI.js
> @@ -3,5 @@
> > - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
> > -
> > -Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm");
> > -
> > -var InlineSpellCheckerUI = new InlineSpellChecker();
> 
> This needs to be moved to browser.js, and then this file needs to be removed
> from global-scripts.inc, web-panels.xul, and import-browserjs-globals.js

I'm assuming just the browser.js under browser/base/content, right?

> ::: toolkit/obsolete/jar.mn
> @@ -3,5 @@
> > -# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> > -
> > -toolkit.jar:
> > -   content/global/globalOverlay.xul             (content/globalOverlay.xul)
> > -*  content/global/dialogOverlay.xul             (content/dialogOverlay.xul)
> 
> It looks like dialogOverlay.xul is still used 3 places.
> cookieAcceptDialog.xul is dead code at this point, so it probably doesn't
> matter. printPreviewProgress.xul and printProgress.xul should just need the
> overlay removed and the top-level <window> changed to <dialog>.

Will do.
https://hg.mozilla.org/mozilla-central/rev/2dca0ba58df6
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Blocks: 1313906
I wonder if we have data on how many add-ons still use nsPreferences (from chrome://global/content/nsUserSettings.js).
I noticed an old (badly written) add-on misbehaving, and figured out it was because of nsPreferences being undefined.
There are a fair number on AMO. It's hard to say exactly how many, though, since most of them don't support remotely recent versions of Firefox, and many of them don't support Firefox at all.

Either way, these scripts have been deprecated for a very long time. It's time for add-ons that are still being maintained to stop using them.
Depends on: 1255149
Depends on: 1345860
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: