Last Comment Bug 782287 - minor SocialService cleanup
: minor SocialService cleanup
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: SocialAPI (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 17
Assigned To: :Gavin Sharp [email: gavin@gavinsharp.com]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-13 08:19 PDT by :Gavin Sharp [email: gavin@gavinsharp.com]
Modified: 2012-08-14 17:52 PDT (History)
1 user (show)
gavin.sharp: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (3.17 KB, patch)
2012-08-13 08:20 PDT, :Gavin Sharp [email: gavin@gavinsharp.com]
adw: review+
Details | Diff | Review

Description :Gavin Sharp [email: gavin@gavinsharp.com] 2012-08-13 08:19:51 PDT
A couple of small changes:
- move the initialization code into its own function to clearly delineate it from the lazy provider loading
- lazy load the MozSocialAPI module, and only load it if social is enabled
Comment 1 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-08-13 08:20:47 PDT
Created attachment 651397 [details] [diff] [review]
patch
Comment 2 Drew Willcoxon :adw 2012-08-13 16:41:34 PDT
Comment on attachment 651397 [details] [diff] [review]
patch

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

::: toolkit/components/social/SocialService.jsm
@@ +44,5 @@
> +}
> +
> +XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
> +  // Initialize the service
> +  initService();

This comment is useless.
Comment 3 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-08-14 07:47:23 PDT
Tough but fair! :) Thanks for the review.

https://hg.mozilla.org/integration/mozilla-inbound/rev/227c29b3c0ee
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-08-14 17:52:20 PDT
https://hg.mozilla.org/mozilla-central/rev/227c29b3c0ee

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