Last Comment Bug 631773 - Clean up the global scope a bit [CreateMailWindowGlobals()]
: Clean up the global scope a bit [CreateMailWindowGlobals()]
Status: RESOLVED FIXED
:
Product: SeaMonkey
Classification: Client Software
Component: MailNews: Message Display (show other bugs)
: Trunk
: All All
: -- normal (vote)
: seamonkey2.1b3
Assigned To: Philip Chee
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-05 03:11 PST by Philip Chee
Modified: 2011-02-15 19:43 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch v1.0 WIP (7.47 KB, patch)
2011-02-05 03:16 PST, Philip Chee
neil: feedback+
Details | Diff | Splinter Review
Patch v1.0a remove unnecessary QIs (10.00 KB, patch)
2011-02-07 06:58 PST, Philip Chee
mnyromyr: review+
neil: superreview+
Details | Diff | Splinter Review

Description Philip Chee 2011-02-05 03:11:12 PST
An itsy bitsy clean up bug focusing on CreateMailWindowGlobals()

Q.v.
Bug 416666 (part 2) Clean up Thunderbird's global scope a bit.
Bug 440616 (part 1 v2) Clean up Thunderbird's global scope a bit more (mail session and 3pane commands).
Comment 1 Philip Chee 2011-02-05 03:16:31 PST
Created attachment 510006 [details] [diff] [review]
Patch v1.0 WIP

>    //Create datasources
> +  var prefix = "@mozilla.org/rdf/datasource;1?name=";
> +  var accountManagerDSContractID = prefix + "msgaccountmanager";
> +  var folderDSContractID         = prefix + "mailnewsfolders";
> +
>    accountManagerDataSource = Components.classes[accountManagerDSContractID].getService();
>    folderDataSource         = Components.classes[folderDSContractID].getService();

If I do .getService(nsiRDFDataSource) here. Can I remove the QIs from the rest of suite/mailnews/ ?
Comment 2 neil@parkwaycc.co.uk 2011-02-05 07:09:28 PST
(In reply to comment #1)
> >    accountManagerDataSource = Components.classes[accountManagerDSContractID].getService();
> >    folderDataSource         = Components.classes[folderDSContractID].getService();
> 
> If I do .getService(nsiRDFDataSource) here. Can I remove the QIs from the rest
> of suite/mailnews/ ?

If you mean the four QIs to nsIRDFDataSource, then yes, they could go.
Comment 3 Philip Chee 2011-02-07 06:58:03 PST
Created attachment 510268 [details] [diff] [review]
Patch v1.0a remove unnecessary QIs

> neil@parkwaycc.co.uk      2011-02-05 07:09:28 PST
> 
> (In reply to comment #1)
>>>    accountManagerDataSource = Components.classes[accountManagerDSContractID].getService();
>>>    folderDataSource         = Components.classes[folderDSContractID].getService();
>> 
>> If I do .getService(nsiRDFDataSource) here. Can I remove the QIs from the rest
>> of suite/mailnews/ ?
> 
> If you mean the four QIs to nsIRDFDataSource, then yes, they could go.
Jolly Good.
Comment 4 Philip Chee 2011-02-15 19:43:49 PST
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/dbc2f57e7b63

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