Last Comment Bug 678351 - dirSvc in mailShutdown.js should be an nsIDirectoryService
: dirSvc in mailShutdown.js should be an nsIDirectoryService
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Testing Infrastructure (show other bugs)
: unspecified
: All All
: -- normal (vote)
: Thunderbird 19.0
Assigned To: Kent James (:rkent)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-11 14:19 PDT by Kent James (:rkent)
Modified: 2012-10-10 07:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Switch to Services and QI interface (1.86 KB, patch)
2012-10-03 09:07 PDT, Kent James (:rkent)
standard8: review+
Details | Diff | Splinter Review

Description Kent James (:rkent) 2011-08-11 14:19:05 PDT
These lines in mailShutdown.js suddenly started failing in my extension tests:

if (gProfileDirProvider) {
  var dirSvc = Cc["@mozilla.org/file/directory_service;1"]
    .getService(Ci.nsIProperties);
  dirSvc.unregisterProvider(gProfileDirProvider);
 }

It fails because unregisterProvider needs nsIDirectoryService

Not sure why this has worked (supposedly) for years. I'll assign it to myself, and maybe get around to fixing it.
Comment 1 Kent James (:rkent) 2012-10-03 09:07:30 PDT
Created attachment 667510 [details] [diff] [review]
Switch to Services and QI interface
Comment 2 Mark Banner (:standard8, limited time in Dec) 2012-10-04 09:38:52 PDT
Comment on attachment 667510 [details] [diff] [review]
Switch to Services and QI interface

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

::: mailnews/test/resources/mailShutdown.js
@@ +8,5 @@
>  //
>  // See also http://developer.mozilla.org/en/Observer_Notifications
>  function postShutdownNotifications()
>  {
> +  var observerService = Services.obs;

I think we can just drop the intermediate variable, Services.obs is shorter than that.

r=me with that fixed.
Comment 3 Kent James (:rkent) 2012-10-10 07:20:31 PDT
Checked in http://hg.mozilla.org/comm-central/rev/796aa4b31867

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