Closed Bug 1531690 Opened 5 years ago Closed 5 years ago

TypeError: can't redefine non-configurable property "BrowserUtils"

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 67.0

People

(Reporter: mkmelin, Assigned: mkmelin)

Details

Attachments

(1 file)

The TypeError: can't redefine non-configurable property "BrowserUtils" error has been showing up for some time, since bug 1520643 IIRC.

This is the bug to fix it. Going to take a look now.

Once BrowserUtils was fixed, NetUtils was next causing trouble.

Since these are set up as lazy getters in toolkit/content/contentAreaUtils.js, our non-module js files can't declare them top level later on.

This patch is also cleaning up some unused imports

Attachment #9047650 - Flags: review?(geoff)
Status: NEW → ASSIGNED
Comment on attachment 9047650 [details] [diff] [review]
bug1531690_BrowserUtils.patch

Oh good, I was just about annoyed enough with this one to do something about it. Now I don't have to.
Attachment #9047650 - Flags: review?(geoff) → review+
Keywords: checkin-needed

I was annoyed, too ;-) Thanks.

Comment on attachment 9047650 [details] [diff] [review]
bug1531690_BrowserUtils.patch

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

::: mailnews/base/prefs/content/converterDialog.js
@@ +14,2 @@
>  var {allAccountsSorted} = ChromeUtils.import("resource:///modules/folderUtils.jsm");
> +var MailstoreConverter = ChromeUtils.import("resource:///modules/mailstoreConverter.jsm");

Any particular reason for this change and its consequences?

That was just for sanity. The mailstoreConverter.jsm module exposes two functions. Previously those would get exposed as top level functions right there in the converterDialog.js, which makes it hard to understand where they are coming from. It's more understandable when you have to access convertMailStoreTo using MailstoreConverter.convertMailStoreTo - which is also the typical pattern for modules elsewhere

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/68560be6fb10
fix TypeError: can't redefine non-configurable property "BrowserUtils". r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 67.0

Interesting. But if it kills the error showing up just by starting TB, I'm happy :)

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

Attachment

General

Created:
Updated:
Size: