Bug 1340163 - Use of contentPrincipalInfo.origin in Media, r=jib a=gchang
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 20 Mar 2017 16:04:06 +0100
changeset 395320 7fc9362cb6a5cc5a53b323d2aa48adc70dab415c
parent 395319 272ad82f806b577c2814679f62040493b0b33fee
child 395321 02747e813bf00e7d2d862f30129c26088463b7f1
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib, gchang
bugs1340163
milestone54.0a2
Bug 1340163 - Use of contentPrincipalInfo.origin in Media, r=jib a=gchang
dom/media/systemservices/MediaParent.cpp
--- a/dom/media/systemservices/MediaParent.cpp
+++ b/dom/media/systemservices/MediaParent.cpp
@@ -102,38 +102,38 @@ class OriginKeyStore : public nsISupport
         }
       }
       mPersistCount = 0;
     }
 
   private:
     void
     PrincipalInfoToString(const ipc::PrincipalInfo& aPrincipalInfo,
-                          nsAutoCString aString)
+                          nsACString& aString)
     {
       switch (aPrincipalInfo.type()) {
         case ipc::PrincipalInfo::TSystemPrincipalInfo:
           aString.Assign("[System Principal]");
           return;
 
         case ipc::PrincipalInfo::TNullPrincipalInfo: {
           const ipc::NullPrincipalInfo& info =
             aPrincipalInfo.get_NullPrincipalInfo();
           aString.Assign(info.spec());
           return;
         }
 
         case ipc::PrincipalInfo::TContentPrincipalInfo: {
           const ipc::ContentPrincipalInfo& info =
             aPrincipalInfo.get_ContentPrincipalInfo();
-          aString.Assign(info.spec());
+          aString.Assign(info.originNoSuffix());
 
           nsAutoCString suffix;
           info.attrs().CreateSuffix(suffix);
-          suffix.Append(suffix);
+          aString.Append(suffix);
           return;
         }
 
         case ipc::PrincipalInfo::TExpandedPrincipalInfo: {
           const ipc::ExpandedPrincipalInfo& info =
             aPrincipalInfo.get_ExpandedPrincipalInfo();
 
           aString.Assign("[Expanded Principal [");