All users were logged out of Bugzilla on October 13th, 2018

ReferenceError: Cu is not defined in ext-i18n.js

RESOLVED FIXED in Firefox 48

Status

RESOLVED FIXED
3 years ago
4 months ago

People

(Reporter: kuoe0.tw, Assigned: kuoe0.tw)

Tracking

unspecified
mozilla48

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
In this line:
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/ext-i18n.js#3

Cu is not declared and the ReferenceError happened.
(Assignee)

Comment 1

3 years ago
Created attachment 8728266 [details] [diff] [review]
Bug-1254866-hg.patch

Hi kmag, could you review the patch? Without this patch, b2g cannot boot up.
Assignee: nobody → kuoe0
Attachment #8728266 - Flags: review?(kmaglione+bmo)
Comment on attachment 8728266 [details] [diff] [review]
Bug-1254866-hg.patch

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

Hm. It should inherit that variable from the Extension.jsm scope. I guess this has something to do with a quirk of the b2g module loader?

::: toolkit/components/extensions/ext-i18n.js
@@ +1,3 @@
>  "use strict";
>  
> +const Cu = Components.utils;

Can you change this to match the other modules?

var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Attachment #8728266 - Flags: review?(kmaglione+bmo)
(Assignee)

Comment 3

3 years ago
Created attachment 8728766 [details] [diff] [review]
Bug-1254866-hg.patch

Hi, kmag! I updated the patch with your suggestion.

But I think we use Cu only. Should we declare other variables like Cc and Ci?
Attachment #8728266 - Attachment is obsolete: true
Flags: needinfo?(kmaglione+bmo)
Attachment #8728766 - Flags: review?(kmaglione+bmo)

Updated

3 years ago
Attachment #8728766 - Flags: review?(kmaglione+bmo) → review+
(In reply to Tommy Kuo [:KuoE0] from comment #3)
> But I think we use Cu only. Should we declare other variables like Cc and Ci?

Yes. If we don't, someone will wind up adding code that uses them in the future, and b2g will break again.
Flags: needinfo?(kmaglione+bmo)
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
The bug will be closed automatically when this merges to mozilla-central.

I'm not sure why this was landed to both inbound and fx-team...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 9

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7e4686be6b1f
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
status-firefox48: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48

Updated

4 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.