backout changeset 51e974db8866 for xpcshell-test bustage CLOSED TREE
authorShane Caraveo <scaraveo@mozilla.com>
Wed, 26 Jun 2013 13:20:38 -0400
changeset 148860 3b955f306226bfe7f8f4035a8573bcf8e2fb0dcc
parent 148859 f06ce34a185e092ee8ff8c7593b255d4fd8f3ca6
child 148861 d572a5ffe839d5c035e77f861d8d3545f2f6c992
child 148877 eb8d520f995411f35beda8563698a0f4d9a9efe0
child 148942 b9e131904d2d67ba3c14fceca1580e56912f1014
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone25.0a1
backs out51e974db88667935dc1e3547869a9837be8413a2
first release with
nightly linux32
3b955f306226 / 25.0a1 / 20130627031027 / files
nightly linux64
3b955f306226 / 25.0a1 / 20130627031027 / files
nightly mac
3b955f306226 / 25.0a1 / 20130627031027 / files
nightly win32
3b955f306226 / 25.0a1 / 20130627031027 / files
nightly win64
3b955f306226 / 25.0a1 / 20130627031027 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
backout changeset 51e974db8866 for xpcshell-test bustage CLOSED TREE
toolkit/components/social/SocialService.jsm
--- a/toolkit/components/social/SocialService.jsm
+++ b/toolkit/components/social/SocialService.jsm
@@ -138,17 +138,20 @@ let SocialServiceInternal = {
 };
 
 XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
   initService();
   let providers = {};
   for (let manifest of this.manifests) {
     try {
       if (ActiveProviders.has(manifest.origin)) {
-        let provider = new SocialProvider(manifest);
+        let activationType = getOriginActivationType(manifest.origin);
+        let blessed = activationType == "builtin" ||
+                      activationType == "whitelist";
+        let provider = new SocialProvider(manifest, blessed);
         providers[provider.origin] = provider;
       }
     } catch (err) {
       Cu.reportError("SocialService: failed to load provider: " + manifest.origin +
                      ", exception: " + err);
     }
   }
   return providers;
@@ -650,17 +653,17 @@ this.SocialService = {
 /**
  * The SocialProvider object represents a social provider, and allows
  * access to its FrameWorker (if it has one).
  *
  * @constructor
  * @param {jsobj} object representing the manifest file describing this provider
  * @param {bool} boolean indicating whether this provider is "built in"
  */
-function SocialProvider(input) {
+function SocialProvider(input, blessed = false) {
   if (!input.name)
     throw new Error("SocialProvider must be passed a name");
   if (!input.origin)
     throw new Error("SocialProvider must be passed an origin");
 
   let id = getAddonIDFromOrigin(input.origin);
   if (Services.blocklist.getAddonBlocklistState(id, input.version || "0") == Ci.nsIBlocklistService.STATE_BLOCKED)
     throw new Error("SocialProvider: provider with origin [" +
@@ -674,21 +677,17 @@ function SocialProvider(input) {
   this.sidebarURL = input.sidebarURL;
   this.shareURL = input.shareURL;
   this.origin = input.origin;
   let originUri = Services.io.newURI(input.origin, null, null);
   this.principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(originUri);
   this.ambientNotificationIcons = {};
   this.errorState = null;
   this.frecency = 0;
-
-  let activationType = getOriginActivationType(input.origin);
-  this.blessed = activationType == "builtin" ||
-                 activationType == "whitelist";
-
+  this.blessed = blessed;
   try {
     this.domain = etld.getBaseDomainFromHost(originUri.host);
   } catch(e) {
     this.domain = originUri.host;
   }
 }
 
 SocialProvider.prototype = {