Backed out changeset 623abe61b52a (bug 1233908) for test failures in browser_aboutHome_activation.js
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 13 Apr 2016 15:16:52 +0200
changeset 330847 e97898890d476686262db5d9a870d35fdc4da8b9
parent 330846 c344a216f1d85a4a97e5a91cba5523fd2b0db967
child 330848 6ef7f0a7ea41dcfd74ae70abe36fd03610e6bfec
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1233908
milestone48.0a1
backs out623abe61b52ab9e3594dd226adfd8d40ff5222e3
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 623abe61b52a (bug 1233908) for test failures in browser_aboutHome_activation.js
toolkit/components/social/SocialService.jsm
--- a/toolkit/components/social/SocialService.jsm
+++ b/toolkit/components/social/SocialService.jsm
@@ -5,17 +5,16 @@
 this.EXPORTED_SYMBOLS = ["SocialService"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/AddonManager.jsm");
 Cu.import("resource://gre/modules/PlacesUtils.jsm");
-Cu.import("resource://gre/modules/debug.js");
 
 const URI_EXTENSION_STRINGS  = "chrome://mozapps/locale/extensions/extensions.properties";
 const ADDON_TYPE_SERVICE     = "service";
 const ID_SUFFIX              = "@services.mozilla.org";
 const STRING_TYPE_NAME       = "type.%ID%.name";
 
 XPCOMUtils.defineLazyModuleGetter(this, "MozSocialAPI", "resource://gre/modules/MozSocialAPI.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "closeAllChatWindows", "resource://gre/modules/MozSocialAPI.jsm");
@@ -152,19 +151,17 @@ XPCOMUtils.defineLazyGetter(SocialServic
     }
   }
   return providers;
 });
 
 function getOriginActivationType(origin) {
   // if this is an about uri, treat it as a directory
   let URI = Services.io.newURI(origin, null, null);
-  let attrs = ChromeUtils.createOriginAttributesFromOrigin(origin);
-  NS_ASSERT(attrs.userContextId == 0);
-  let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, attrs);
+  let principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
   if (Services.scriptSecurityManager.isSystemPrincipal(principal) || origin == "moz-safe-about:home") {
     return "internal";
   }
 
   let directories = Services.prefs.getCharPref("social.directories").split(',');
   if (directories.indexOf(origin) >= 0)
     return "directory";
 
@@ -514,19 +511,17 @@ this.SocialService = {
       if (!data['origin']) {
         Cu.reportError("SocialService.manifestFromData directory service provided manifest without origin.");
         return null;
       }
       installOrigin = data.origin;
     }
     // force/fixup origin
     let URI = Services.io.newURI(installOrigin, null, null);
-    let attrs = ChromeUtils.createOriginAttributesFromOrigin(installOrigin);
-    NS_ASSERT(attrs.userContextid == 0);
-    principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, attrs);
+    principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
     data.origin = principal.origin;
 
     // iconURL and name are required
     let providerHasFeatures = featureURLs.some(url => data[url]);
     if (!providerHasFeatures) {
       Cu.reportError("SocialService.manifestFromData manifest missing required urls.");
       return null;
     }
@@ -713,19 +708,17 @@ function SocialProvider(input) {
   this.shareURL = input.shareURL;
   this.statusURL = input.statusURL;
   this.markURL = input.markURL;
   this.markedIcon = input.markedIcon;
   this.unmarkedIcon = input.unmarkedIcon;
   this.postActivationURL = input.postActivationURL;
   this.origin = input.origin;
   let originUri = Services.io.newURI(input.origin, null, null);
-  let attrs = ChromeUtils.createOriginAttributesFromOrigin(input.origin);
-  NS_ASSERT(attrs.userContextId == 0);
-  this.principal = Services.scriptSecurityManager.createCodebasePrincipal(originUri, attrs);
+  this.principal = Services.scriptSecurityManager.createCodebasePrincipal(originUri, {});
   this.ambientNotificationIcons = {};
   this.errorState = null;
   this.frecency = 0;
 
   try {
     this.domain = etld.getBaseDomainFromHost(originUri.host);
   } catch(e) {
     this.domain = originUri.host;