Closed
Bug 1259522
Opened 9 years ago
Closed 8 years ago
NewTabWebChannel.jsm triggers deprecation warning, "DEPRECATION WARNING: This path to event-emitter.js is deprecated. Please use require("devtools/shared/event-emitter") to load this module."
Categories
(Firefox :: New Tab Page, defect)
Firefox
New Tab Page
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: oyiptong)
References
Details
Attachments
(1 file)
STR:
1. Start Firefox Nightly, and open a new tab.
2. Check Error Console.
ACTUAL RESULTS: This warning appears in the error console:
DEPRECATION WARNING: This path to event-emitter.js is deprecated. Please use require("devtools/shared/event-emitter") to load this module.
You may find more details about this deprecation at: https://bugzil.la/912121
resource://gre/modules/devtools/event-emitter.js 33 null
resource://gre/modules/devtools/event-emitter.js 21 null
resource://gre/modules/devtools/event-emitter.js 12 null
resource://app/modules/NewTabWebChannel.jsm 28 null
resource://gre/modules/XPCOMUtils.jsm 198 XPCU_defineLazyGetter/<.get
resource://app/modules/NewTabWebChannel.jsm 76 NewTabWebChannelImpl
resource://app/modules/NewTabWebChannel.jsm 295 null
resource://gre/modules/XPCOMUtils.jsm 273 XPCU_moduleLambda
resource://gre/modules/XPCOMUtils.jsm 198 XPCU_defineLazyGetter/<.get
resource://app/components/nsBrowserGlue.js 763 BG__finalUIStartup
resource://app/components/nsBrowserGlue.js 274 BG_observe
I'm not 100% sure, but I think this chains back to this code:
>XPCOMUtils.defineLazyGetter(this, "EventEmitter", function() {
> const {EventEmitter} = Cu.import("resource://gre/modules/devtools/event-emitter.js", {});
> return EventEmitter;
>});
http://hg.mozilla.org/mozilla-central/annotate/6202ade0e6d6/browser/components/newtab/NewTabWebChannel.jsm#l27
Looks like this file (NewTabWebChannel.jsm) was only added last week, in bug 1239118.
Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(oyiptong)
Assignee | ||
Comment 1•9 years ago
|
||
Looks like we need to use the new path.
Thanks for the bug.
Flags: needinfo?(oyiptong)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → oyiptong
Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/42317/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/42317/
Attachment #8734518 -
Flags: review?(dholbert)
Reporter | ||
Comment 3•9 years ago
|
||
Comment on attachment 8734518 [details]
MozReview Request: Bug 1259522 - use non-deprecated event-emitter.js resource path in NewTabWebChannel r?emtwo
https://reviewboard.mozilla.org/r/42317/#review38863
Thanks for the quick fix! But, you should probably get review from someone who knows more about .js/.jsm than I do (I'm not sure I've ever touched a .jsm file). (Might make sense to get review from someone who was involved in bug 912121, the bug mentioned in the warning.)
One thing I notice: the warning quoted in comment 0 says:
Please use require("devtools/shared/event-emitter") to load this module.
...whereas your patch is still doing something else. (not using 'require', and using a path that ends with event-emitter.js instead of just event-emitter)
I have no idea whether that difference is OK or not (which is why I'm not a good reviewer here :)). Hopefully you know whether that's OK though, & your next reviewer-choice will know as well.
Attachment #8734518 -
Flags: review?(dholbert)
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8734518 [details]
MozReview Request: Bug 1259522 - use non-deprecated event-emitter.js resource path in NewTabWebChannel r?emtwo
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/42317/diff/1-2/
Attachment #8734518 -
Attachment description: MozReview Request: Bug 1259522 - use non-deprecated event-emitter.js resource path in NewTabWebChannel r?dholbert → MozReview Request: Bug 1259522 - use non-deprecated event-emitter.js resource path in NewTabWebChannel r?emtwo
Attachment #8734518 -
Flags: review?(msamuel)
Comment 5•9 years ago
|
||
Comment on attachment 8734518 [details]
MozReview Request: Bug 1259522 - use non-deprecated event-emitter.js resource path in NewTabWebChannel r?emtwo
https://reviewboard.mozilla.org/r/42317/#review40383
Attachment #8734518 -
Flags: review?(msamuel) → review+
Updated•8 years ago
|
Comment 6•8 years ago
|
||
This has been fixed by bug 1259045.
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•