Last Comment Bug 1312143 - Delete toolkit/obsolete
: Delete toolkit/obsolete
Status: RESOLVED FIXED
: addon-compat
Product: Toolkit
Classification: Components
Component: General (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla52
Assigned To: Eric Rahm [:erahm]
:
:
Mentors:
Depends on: 1255149
Blocks: nuke-nsSupportsArray 1313906
  Show dependency treegraph
 
Reported: 2016-10-21 18:09 PDT by Eric Rahm [:erahm]
Modified: 2017-01-03 03:59 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Delete toolkit/obsolete (19.20 KB, patch)
2016-10-21 18:49 PDT, Eric Rahm [:erahm]
kmaglione+bmo: review+
Details | Diff | Splinter Review

Description User image Eric Rahm [:erahm] 2016-10-21 18:09:06 PDT
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.
Comment 1 User image Kris Maglione [:kmag] 2016-10-21 18:23:17 PDT
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.
Comment 2 User image Eric Rahm [:erahm] 2016-10-21 18:49:49 PDT
Created attachment 8803579 [details] [diff] [review]
Delete toolkit/obsolete

This removes 'toolkit/obsolete'. I'm not sure the best reviewer here, Kris feel free to redirect.

MozReview-Commit-ID: JZfi0W2wqCL
Comment 3 User image Kris Maglione [:kmag] 2016-10-21 21:16:13 PDT
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>.
Comment 4 User image Eric Rahm [:erahm] 2016-10-24 11:41:04 PDT
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.
Comment 6 User image Eric Rahm [:erahm] 2016-10-24 18:23:31 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dca0ba58df6abd5c5f5b260644b3b56f6e7e69b
Bug 1312143 - Delete toolkit/obsolete. r=John-Galt
Comment 7 User image Carsten Book [:Tomcat] 2016-10-25 01:47:14 PDT
https://hg.mozilla.org/mozilla-central/rev/2dca0ba58df6
Comment 8 User image Francesco Lodolo [:flod] 2016-11-01 12:27:02 PDT
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.
Comment 9 User image Kris Maglione [:kmag] 2016-11-01 14:30:23 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.