Open Bug 917024 Opened 11 years ago Updated 2 years ago

[meta] Remove uses of obsolete JS files and log a deprecation warning to the browser console when used

Categories

(Toolkit :: General, defect)

defect

Tracking

()

People

(Reporter: mossop, Unassigned)

References

(Depends on 2 open bugs)

Details

(Keywords: meta, Whiteboard: [Do use replacement parts in blocking bugs (to be filed)])

There are a number of obsolete XUL and JS files in http://mxr.mozilla.org/mozilla-central/source/toolkit/obsolete/content/. A couple are still in use in the tree. We should fix any code that uses these files and then make them log a deprecation warning to the browser console when used. We can then remove them after a few releases of warnings.
Blocks: 916235
Depends on: 56680
Dave, could you give an example (or at least pointers) on how to add this warning to js/xul files?
Keywords: meta
Whiteboard: [Do use replacement parts in blocking bugs (to be filed)]
http://mxr.mozilla.org/comm-central/search?string=dialogOverlay.js&case=on
(c-c) "Found 3 matching lines in 3 files"
1 'dialogOverlay.xul' (obviously) + 1 SeaMonkey: needs 1 blocking bug.

http://mxr.mozilla.org/mozilla-central/search?string=dialogOverlay.xul&case=on
(m-c) "Found 5 matching lines in 5 files"
http://mxr.mozilla.org/comm-central/search?string=globalOverlay.xul&case=on
(c-c) "Found 14 matching lines in 12 files"
4 Toolkit + 4 Calendar + 1 Mailnews + 2 SeaMonkey: needs a few blocking bugs.

http://mxr.mozilla.org/mozilla-central/search?string=globalOverlay.xul&case=on
(m-c) "Found 3 matching lines in 3 files"
http://mxr.mozilla.org/comm-central/search?string=globalOverlay.xul&case=on
(c-c) "Found 31 matching lines in 31 files"
2 Core + lots in "SeaMonkey++": needs a few blocking bugs.

http://mxr.mozilla.org/mozilla-central/search?string=inlineSpellCheckUI.js&case=on
(m-c) "Found 3 matching lines in 3 files"
http://mxr.mozilla.org/comm-central/search?string=inlineSpellCheckUI.js&case=on
(c-c) "Found 5 matching lines in 5 files"
2 Firefox + 2 "SeaMonkey": needs 2 blocking bugs.

http://mxr.mozilla.org/comm-central/search?string=nsClipboard.js&case=on
(c-c) "Found 4 matching lines in 4 files"
1 SeaMonkey + 1 ChatZilla + 1 Venkman: needs 3 blocking bugs.

http://mxr.mozilla.org/comm-central/search?string=nsUserSettings.js&case=on
(c-c) "Found 4 matching lines in 4 files"
1 SeaMonkey + 1 ChatZilla + 1 Venkman: needs 3 blocking bugs.

http://mxr.mozilla.org/comm-central/search?string=strres.js&case=on
(c-c) "Found 5 matching lines in 5 files"
No actual use (thanks to bug 56680): ready to have a warning added :-)
Depends on: 917232
Depends on: 866443
Depends on: 917234
Depends on: 917236
(In reply to Serge Gautherie (:sgautherie) from comment #2)

> http://mxr.mozilla.org/comm-central/search?string=dialogOverlay.js&case=on
> (c-c) "Found 3 matching lines in 3 files"
> 1 'dialogOverlay.xul' (obviously) + 1 SeaMonkey: needs 1 blocking bug.

I filed SeaMonkey bug 917232.

> http://mxr.mozilla.org/comm-central/search?string=globalOverlay.xul&case=on
> (c-c) "Found 14 matching lines in 12 files"

http://mxr.mozilla.org/comm-central/search?string=dialogOverlay.xul&case=on !

> http://mxr.mozilla.org/comm-central/search?string=nsClipboard.js&case=on
> (c-c) "Found 4 matching lines in 4 files"
> 1 SeaMonkey + 1 ChatZilla + 1 Venkman: needs 3 blocking bugs.

I filed SeaMonkey bug 917234.

> http://mxr.mozilla.org/comm-central/search?string=nsUserSettings.js&case=on
> (c-c) "Found 4 matching lines in 4 files"
> 1 SeaMonkey + 1 ChatZilla + 1 Venkman: needs 3 blocking bugs.

I filed SeaMonkey bug 917236.
(In reply to Serge Gautherie (:sgautherie) from comment #2)

> http://mxr.mozilla.org/comm-central/search?string=globalOverlay.xul&case=on
> (c-c) "Found 14 matching lines in 12 files"
> 4 Toolkit + 4 Calendar + 1 Mailnews + 2 SeaMonkey: needs a few blocking bugs.

Calendar part is already filed as bug 866443.
Flags: needinfo?(dtownsend+bugmail)
(In reply to Serge Gautherie (:sgautherie) from comment #1)
> Dave, could you give an example (or at least pointers) on how to add this
> warning to js/xul files?

Deprecated.jsm has a function to log a deprecation warning. That requires a url for each warning documenting what has been deprecated and why. For this case it could be as simple as an MDN page explaining that this code is obsolete and is getting removed. Add-ons can copy the code into their add-ons if they still want to use it, or point to alternatives.
Flags: needinfo?(dtownsend+bugmail)
Depends on: 917545
Depends on: 917563
Depends on: 1106536
Depends on: 1106540
Severity: minor → S4
Summary: Remove uses of obsolete JS files and log a deprecation warning to the browser console when used → [meta] Remove uses of obsolete JS files and log a deprecation warning to the browser console when used
You need to log in before you can comment on or make changes to this bug.