Bug 1277293 - Replace getSimpleCodebasePrincipal with createCodebasePrincipal (SeaMonkey Part) SEA_COMM490_20160927_RELBRANCH
authorPhilip Chee <philip.chee@gmail.com>
Mon, 03 Oct 2016 20:31:17 +0200
branchSEA_COMM490_20160927_RELBRANCH
changeset 31343 b96f4ce8b7ec77e526d9e286ffebd3778b8714b8
parent 31340 2892f752281d7a2481e685832e5ede3ac94382d1
child 31344 a8211fcb6a6feb34570e03a64ce9356c1976d9f7
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1277293
Bug 1277293 - Replace getSimpleCodebasePrincipal with createCodebasePrincipal (SeaMonkey Part)
suite/browser/test/browser/browser_bug413915.js
suite/feeds/src/FeedWriter.js
suite/mailnews/nsDragAndDrop.js
--- a/suite/browser/test/browser/browser_bug413915.js
+++ b/suite/browser/test/browser/browser_bug413915.js
@@ -1,15 +1,15 @@
 function test() {
   var ioserv = Components.classes["@mozilla.org/network/io-service;1"].
                getService(Components.interfaces.nsIIOService);
   var exampleUri = ioserv.newURI("http://example.com/", null, null);
   var secman = Components.classes["@mozilla.org/scriptsecuritymanager;1"].
                getService(Components.interfaces.nsIScriptSecurityManager);
-  var principal = secman.getSimpleCodebasePrincipal(exampleUri);
+  var principal = secman.createCodebasePrincipal(exampleUri, {});
 
   function testIsFeed(aTitle, aHref, aType, aKnown) {
     var link = { title: aTitle, href: aHref, type: aType };
     return isValidFeed(link, principal, aKnown);
   }
 
   var href = "http://example.com/feed/";
   var atomType = "application/atom+xml";
--- a/suite/feeds/src/FeedWriter.js
+++ b/suite/feeds/src/FeedWriter.js
@@ -1001,17 +1001,18 @@ FeedWriter.prototype = {
     this._feedURI = this._getOriginalURI(aWindow);
     if (!this._feedURI)
       return;
 
     this._window = aWindow;
     this._document = aWindow.document;
     this._handlersMenuList = this._getUIElement("handlersMenuList");
 
-    this._feedPrincipal = Services.scriptSecurityManager.getSimpleCodebasePrincipal(this._feedURI);
+    this._feedPrincipal = Services.scriptSecurityManager
+                                  .createCodebasePrincipal(this._feedURI, {});
 
     LOG("Subscribe Preview: feed uri = " + this._window.location.href);
 
     // Set up the subscription UI
     this._initSubscriptionUI();
     Services.prefs.addObserver(PREF_SELECTED_ACTION, this, false);
     Services.prefs.addObserver(PREF_SELECTED_READER, this, false);
     Services.prefs.addObserver(PREF_SELECTED_WEB, this, false);
--- a/suite/mailnews/nsDragAndDrop.js
+++ b/suite/mailnews/nsDragAndDrop.js
@@ -583,17 +583,17 @@ var nsDragAndDrop = {
 
       if (!aDragSession)
         aDragSession = this.mDragService.getCurrentSession();
 
       var sourceDoc = aDragSession.sourceDocument;
       // Use "file:///" as the default sourceURI so that drops of file:// URIs
       // are always allowed.
       var principal = sourceDoc ? sourceDoc.nodePrincipal
-                                : secMan.getSimpleCodebasePrincipal(ioService.newURI("file:///", null, null));
+                                : secMan.createCodebasePrincipal(ioService.newURI("file:///", null, null), {});
 
       try {
         secMan.checkLoadURIStrWithPrincipal(principal, aDraggedText,
                                             nsIScriptSecurityManager.STANDARD);
       } catch (e) {
         // Stop event propagation right here.
         aEvent.stopPropagation();