Closed Bug 1841845 Opened 11 months ago Closed 9 months ago

Remove Services.jsm consumers in comm-central/suite

Categories

(SeaMonkey :: General, task)

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: arai, Assigned: ewong)

References

Details

Attachments

(7 files, 10 obsolete files)

2.67 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
3.56 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
34.91 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
1.34 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
2.39 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
4.29 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review
12.59 KB, patch
iannbugzilla
: review+
Details | Diff | Splinter Review

Services.jsm is going to be removed shortly.

comm-central/suite contains references, and those needs to be removed.

https://searchfox.org/comm-central/search?q=%2FServices.jsm&path=suite%2F&case=false&regexp=false

In most case, simply removing the statement should solve, given Services global variable is available in all privileged global from 104 (bug 1667455).

Assignee: nobody → ewong
Attached patch wip1.patch (obsolete) — Splinter Review

First patch in 5 (?) years... requesting feedback on whether my approach is
currently on track.

Attachment #9342508 - Flags: feedback?(iannbugzilla)
Attached patch wip1.patch (obsolete) — Splinter Review

WIP patch #2 for review.

Attachment #9342508 - Attachment is obsolete: true
Attachment #9342508 - Flags: feedback?(iannbugzilla)
Attachment #9342667 - Flags: review?(iannbugzilla)
Status: NEW → ASSIGNED

Comment on attachment 9342667 [details] [diff] [review]
wip1.patch

ewong looks like the patch was done against 2.53 not comm-central. 2.53 is not affected and in the current state does not apply to central.

Attachment #9342667 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_modules.diff (obsolete) — Splinter Review

It helps that I'm using the right branch. Previous patch was on 2.53.

This is for suite/modules.

Attachment #9342667 - Attachment is obsolete: true
Attachment #9343179 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_mailnews.diff (obsolete) — Splinter Review

suite/mailnews part.

Attachment #9343185 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_exteditor.diff (obsolete) — Splinter Review

suite/extentions + suite/editor part

Attachment #9343188 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_cz.diff (obsolete) — Splinter Review

suite/chatzilla part

Attachment #9343189 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_components.diff (obsolete) — Splinter Review

suite/components part

Attachment #9343190 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_browser.diff (obsolete) — Splinter Review

suite/browser part

Attachment #9343191 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_base.diff (obsolete) — Splinter Review

suite/base part

Attachment #9343192 - Flags: review?(iannbugzilla)

updated patch with description + Username info.

Attachment #9343192 - Attachment is obsolete: true
Attachment #9343192 - Flags: review?(iannbugzilla)
Attachment #9343666 - Flags: review?(iannbugzilla)

[suite/browser]
updated patch with description + Username info.

Attachment #9343191 - Attachment is obsolete: true
Attachment #9343191 - Flags: review?(iannbugzilla)
Attachment #9343667 - Flags: review?(iannbugzilla)

suite/components
updated patch with description + Username info.

Attachment #9343190 - Attachment is obsolete: true
Attachment #9343190 - Flags: review?(iannbugzilla)
Attachment #9343668 - Flags: review?(iannbugzilla)

chatzilla
updated patch with description + Username info.

Attachment #9343189 - Attachment is obsolete: true
Attachment #9343189 - Flags: review?(iannbugzilla)
Attachment #9343669 - Flags: review?(iannbugzilla)

editor + extensions
updated patch with description + Username info.

Attachment #9343188 - Attachment is obsolete: true
Attachment #9343188 - Flags: review?(iannbugzilla)
Attachment #9343670 - Flags: review?(iannbugzilla)
Attached patch bug_1841845_mailnews.diff (obsolete) — Splinter Review

suite/mailnews
updated patch with description + Username info.

Attachment #9343185 - Attachment is obsolete: true
Attachment #9343185 - Flags: review?(iannbugzilla)
Attachment #9343671 - Flags: review?(iannbugzilla)

suite/modules
updated patch with description + Username info.

Attachment #9343179 - Attachment is obsolete: true
Attachment #9343179 - Flags: review?(iannbugzilla)
Attachment #9343672 - Flags: review?(iannbugzilla)
Comment on attachment 9343671 [details] [diff] [review]
bug_1841845_mailnews.diff

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

::: suite/mailnews/content/mailWidgets.xml
@@ -1076,4 @@
>          var { MailServices } = ChromeUtils.import(
>            "resource:///modules/MailServices.jsm"
>          );
> -        ChromeUtils.import("resource://gre/modules/Services.jsm", this);

`ChromeUtils.import` consumers in this file uses the 2nd parameter to import the module into `this` object, and uses `this.Services` style to access it.

https://searchfox.org/comm-central/rev/6fb5895249a6f1abef7471b55198813abb3b34ff/suite/mailnews/content/mailWidgets.xml#994
```
this.Services.strings.createBundle(
```

Those consumers also need to be updated to use `Services` global variable instead.

Thanks to @arai for the nit. Updated the mailnews patch.

Attachment #9343671 - Attachment is obsolete: true
Attachment #9343671 - Flags: review?(iannbugzilla)
Attachment #9345301 - Flags: review?(iannbugzilla)
Attachment #9343666 - Flags: review?(iannbugzilla) → review+
Attachment #9343667 - Flags: review?(iannbugzilla) → review+
Attachment #9343668 - Flags: review?(iannbugzilla) → review+
Attachment #9343669 - Flags: review?(iannbugzilla) → review+
Attachment #9343670 - Flags: review?(iannbugzilla) → review+
Attachment #9343672 - Flags: review?(iannbugzilla) → review+
Attachment #9345301 - Flags: review?(iannbugzilla) → review+

Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/9f2df07917b5
Remove Services.jsm consumers in c-c/suite - base. r=IanN
https://hg.mozilla.org/comm-central/rev/bdcdb34c8dee
Remove Services.jsm consumers in c-c/suite - browser. r=IanN
https://hg.mozilla.org/comm-central/rev/6755b0e5c044
Remove Services.jsm consumers in c-c/suite - components. r=IanN
https://hg.mozilla.org/comm-central/rev/db4628285a31
Remove Services.jsm consumers in c-c/suite - chatzilla. r=IanN
https://hg.mozilla.org/comm-central/rev/a994a09bd38c
Remove Services.jsm consumers in c-c/suite - editor/extensions. r=IanN
https://hg.mozilla.org/comm-central/rev/899e313586fb
Remove Services.jsm consumers in c-c/suite - modules. r=IanN
https://hg.mozilla.org/comm-central/rev/82cc162e6567
Remove Services.jsm consumers in c-c/suite - mailnews. r=IanN

Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED

Sorry took me awhile to check this in. Was a bit busy with the 2.53.17 release and personal stuff.

Target Milestone: --- → Future
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: