Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Import from chromeutils #228

Merged

Conversation

Trim
Copy link
Member

@Trim Trim commented Dec 1, 2018

From the Addon 57 manual, I've learned that Components.utils.import() has changed to ChromeUtils.import() and the new one is a bit faster.

In all files that used the var Cu only for imports, I've removed it too.

…d form still works (but is slower)

Source:
https://wiki.mozilla.org/Thunderbird/Add-ons_Guide_57

Command:
```sh
git grep -l 'Cu.import' | xargs sed -i 's/Cu.import/ChromeUtils.import/g'
git grep -l 'ChromeUtils.importGlobalProperties' | xargs sed -i 's/ChromeUtils.importGlobalProperties/Cu.importGlobalProperties/g'
```
Commands:
```sh
# Erase var Cu initialization
git grep -l 'var Cu = Components.utils;' | xargs sed -i 's/var Cu = Components.utils;//g'
# Find files to not commit with this change due to usage of the var:
git grep -l 'Cu\.'
```
@advancingu advancingu merged commit 61447b6 into ExchangeCalendar:v5.0.0-alpha3 Dec 3, 2018
@advancingu
Copy link
Member

Thanks! Cursory review did not show any apparent issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants