Bug 1335166 - Backed out changeset 229e1278d976i (Bug 1335166). r=backout a=lizzard
authorChris Pearce <cpearce@mozilla.com>
Fri, 27 Jan 2017 12:30:33 +1300
changeset 375798 086d2492f20bc1dd6759027511e57156cd145400
parent 375797 594b1915813622cc282e1878f7b6d2875ff7aa99
child 375799 662e5af3a92895074b6644bc0f8547d84d00d7df
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout, lizzard
bugs1335166
milestone53.0a2
Bug 1335166 - Backed out changeset 229e1278d976i (Bug 1335166). r=backout a=lizzard MozReview-Commit-ID: NnHo7YXFls
dom/media/eme/MediaKeySession.cpp
dom/media/gmp/GMPDecryptorChild.cpp
dom/media/gmp/GMPDecryptorParent.cpp
dom/media/gmp/PGMPDecryptor.ipdl
--- a/dom/media/eme/MediaKeySession.cpp
+++ b/dom/media/eme/MediaKeySession.cpp
@@ -633,24 +633,24 @@ MediaKeySession::MakePromise(ErrorResult
     NS_WARNING("Passed non-global to MediaKeys ctor!");
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
   return DetailedPromise::Create(global, aRv, aName);
 }
 
 void
-MediaKeySession::SetExpiration(double aSecondsSinceEpoch)
+MediaKeySession::SetExpiration(double aExpiration)
 {
   EME_LOG("MediaKeySession[%p,'%s'] SetExpiry(%.12lf) (%.2lf hours from now)",
           this,
           NS_ConvertUTF16toUTF8(mSessionId).get(),
-          aSecondsSinceEpoch,
-          aSecondsSinceEpoch - double(time(0)) / (60 * 60));
-  mExpiration = aSecondsSinceEpoch;
+          aExpiration,
+          (aExpiration - 1000.0 * double(time(0))) / (1000.0 * 60 * 60));
+  mExpiration = aExpiration;
 }
 
 EventHandlerNonNull*
 MediaKeySession::GetOnkeystatuseschange()
 {
   return GetEventHandler(nsGkAtoms::onkeystatuseschange, EmptyString());
 }
 
--- a/dom/media/gmp/GMPDecryptorChild.cpp
+++ b/dom/media/gmp/GMPDecryptorChild.cpp
@@ -120,21 +120,20 @@ GMPDecryptorChild::SessionMessage(const 
   CALL_ON_GMP_THREAD(SendSessionMessage,
                      nsCString(aSessionId, aSessionIdLength),
                      aMessageType, Move(msg));
 }
 
 void
 GMPDecryptorChild::ExpirationChange(const char* aSessionId,
                                     uint32_t aSessionIdLength,
-                                    GMPTimestamp aMillisecondsSinceEpoch)
+                                    GMPTimestamp aExpiryTime)
 {
   CALL_ON_GMP_THREAD(SendExpirationChange,
-                     nsCString(aSessionId, aSessionIdLength),
-                     aMillisecondsSinceEpoch / 1e3);
+                     nsCString(aSessionId, aSessionIdLength), aExpiryTime);
 }
 
 void
 GMPDecryptorChild::SessionClosed(const char* aSessionId,
                                  uint32_t aSessionIdLength)
 {
   CALL_ON_GMP_THREAD(SendSessionClosed,
                      nsCString(aSessionId, aSessionIdLength));
--- a/dom/media/gmp/GMPDecryptorParent.cpp
+++ b/dom/media/gmp/GMPDecryptorParent.cpp
@@ -302,26 +302,26 @@ GMPDecryptorParent::RecvSessionMessage(c
     return IPC_FAIL_NO_REASON(this);
   }
   mCallback->SessionMessage(aSessionId, ToMediaKeyMessageType(aMessageType), aMessage);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 GMPDecryptorParent::RecvExpirationChange(const nsCString& aSessionId,
-                                         const double& aSecondsSinceEpoch)
+                                         const double& aExpiryTime)
 {
   LOGD(("GMPDecryptorParent[%p]::RecvExpirationChange(sessionId='%s', expiry=%lf)",
-        this, aSessionId.get(), aSecondsSinceEpoch));
+        this, aSessionId.get(), aExpiryTime));
 
   if (!mIsOpen) {
     NS_WARNING("Trying to use a dead GMP decrypter!");
     return IPC_FAIL_NO_REASON(this);
   }
-  mCallback->ExpirationChange(aSessionId, aSecondsSinceEpoch);
+  mCallback->ExpirationChange(aSessionId, aExpiryTime);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 GMPDecryptorParent::RecvSessionClosed(const nsCString& aSessionId)
 {
   LOGD(("GMPDecryptorParent[%p]::RecvSessionClosed(sessionId='%s')",
         this, aSessionId.get()));
--- a/dom/media/gmp/PGMPDecryptor.ipdl
+++ b/dom/media/gmp/PGMPDecryptor.ipdl
@@ -66,17 +66,17 @@ parent:
   async RejectPromise(uint32_t aPromiseId,
                       GMPDOMException aDOMExceptionCode,
                       nsCString aMessage);
 
   async SessionMessage(nsCString aSessionId,
                        GMPSessionMessageType aMessageType,
                        uint8_t[] aMessage);
 
-  async ExpirationChange(nsCString aSessionId, double aSecondsSinceEpoch);
+  async ExpirationChange(nsCString aSessionId, double aExpiryTime);
 
   async SessionClosed(nsCString aSessionId);
 
   async SessionError(nsCString aSessionId,
                      GMPDOMException aDOMExceptionCode,
                      uint32_t aSystemCode,
                      nsCString aMessage);