Bug 1332530 - Remove GMP enum storage names. r=gerald
authorChris Pearce <cpearce@mozilla.com>
Fri, 20 Jan 2017 15:06:00 +1300
changeset 468467 8977e2dfe1792701e8b3d9b1b51a9af1d36316ec
parent 468466 b599c9fa408006bb06b20febf41e8010a970ef35
child 468468 962c947c1e50785cf873754081ed9dfc6e9676c2
push id43477
push userbmo:jhofmann@mozilla.com
push dateTue, 31 Jan 2017 15:48:49 +0000
reviewersgerald
bugs1332530
milestone54.0a1
Bug 1332530 - Remove GMP enum storage names. r=gerald Note: Only the Adobe GMP used enum storage, so not that it's unused we may as well remove this. MozReview-Commit-ID: JtmQ69eJzaI
dom/media/gmp-plugin/gmp-test-decryptor.cpp
dom/media/gmp-plugin/gmp-test-decryptor.h
dom/media/gmp-plugin/gmp-test-storage.cpp
dom/media/gmp-plugin/gmp-test-storage.h
dom/media/gmp/GMPDiskStorage.cpp
dom/media/gmp/GMPMemoryStorage.cpp
dom/media/gmp/GMPPlatform.cpp
dom/media/gmp/GMPStorage.h
dom/media/gmp/GMPStorageChild.cpp
dom/media/gmp/GMPStorageChild.h
dom/media/gmp/GMPStorageParent.cpp
dom/media/gmp/GMPStorageParent.h
dom/media/gmp/PGMPStorage.ipdl
dom/media/gmp/gmp-api/gmp-platform.h
dom/media/gmp/gmp-api/gmp-storage.h
dom/media/gmp/widevine-adapter/WidevineAdapter.h
dom/media/gtest/TestGMPCrossOrigin.cpp
--- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp
@@ -469,55 +469,16 @@ public:
     } else {
       FakeDecryptor::Message("retrieved " + mRecordId + " " + aData);
     }
     delete this;
   }
   string mRecordId;
 };
 
-static void
-RecvGMPRecordIterator(GMPRecordIterator* aRecordIterator,
-                      void* aUserArg,
-                      GMPErr aStatus)
-{
-  FakeDecryptor* decryptor = reinterpret_cast<FakeDecryptor*>(aUserArg);
-  decryptor->ProcessRecordNames(aRecordIterator, aStatus);
-}
-
-void
-FakeDecryptor::ProcessRecordNames(GMPRecordIterator* aRecordIterator,
-                                  GMPErr aStatus)
-{
-  if (sInstance != this) {
-    FakeDecryptor::Message("Error aUserArg was not passed through GetRecordIterator");
-    return;
-  }
-  if (GMP_FAILED(aStatus)) {
-    FakeDecryptor::Message("Error GetRecordIterator failed");
-    return;
-  }
-  std::string response("record-names ");
-  bool first = true;
-  const char* name = nullptr;
-  uint32_t len = 0;
-  while (GMP_SUCCEEDED(aRecordIterator->GetName(&name, &len))) {
-    std::string s(name, name+len);
-    if (!first) {
-      response += ",";
-    } else {
-      first = false;
-    }
-    response += s;
-    aRecordIterator->NextRecord();
-  }
-  aRecordIterator->Close();
-  FakeDecryptor::Message(response);
-}
-
 enum ShutdownMode {
   ShutdownNormal,
   ShutdownTimeout,
   ShutdownStoreToken
 };
 
 static ShutdownMode sShutdownMode = ShutdownNormal;
 static string sShutdownToken = "";
@@ -553,12 +514,10 @@ FakeDecryptor::UpdateSession(uint32_t aP
       sShutdownMode = ShutdownStoreToken;
       sShutdownToken = tokens[2];
       Message("shutdown-token received " + sShutdownToken);
     }
   } else if (task == "retrieve-shutdown-token") {
     ReadRecord("shutdown-token", new ReportReadRecordContinuation("shutdown-token"));
   } else if (task == "test-op-apis") {
     mozilla::gmptest::TestOuputProtectionAPIs();
-  } else if (task == "retrieve-record-names") {
-    GMPEnumRecordNames(&RecvGMPRecordIterator, this);
   }
 }
--- a/dom/media/gmp-plugin/gmp-test-decryptor.h
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.h
@@ -66,19 +66,16 @@ public:
                GMPEncryptedBufferMetadata* aMetadata) override
   {
   }
 
   void DecryptingComplete() override;
 
   static void Message(const std::string& aMessage);
 
-  void ProcessRecordNames(GMPRecordIterator* aRecordIterator,
-                          GMPErr aStatus);
-
 private:
 
   virtual ~FakeDecryptor() {}
   static FakeDecryptor* sInstance;
 
   void TestStorage();
 
   GMPDecryptorCallback* mCallback;
--- a/dom/media/gmp-plugin/gmp-test-storage.cpp
+++ b/dom/media/gmp-plugin/gmp-test-storage.cpp
@@ -219,15 +219,8 @@ private:
 };
 
 void
 GMPOpenRecord(const std::string& aRecordName,
               OpenContinuation* aContinuation)
 {
   OpenRecordClient::Open(aRecordName, aContinuation);
 }
-
-GMPErr
-GMPEnumRecordNames(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                   void* aUserArg)
-{
-  return g_platform_api->getrecordenumerator(aRecvIteratorFunc, aUserArg);
-}
--- a/dom/media/gmp-plugin/gmp-test-storage.h
+++ b/dom/media/gmp-plugin/gmp-test-storage.h
@@ -51,13 +51,9 @@ public:
   virtual ~OpenContinuation() {}
   virtual void OpenComplete(GMPErr aStatus, GMPRecord* aRecord) = 0;
 };
 
 void
 GMPOpenRecord(const std::string& aRecordName,
               OpenContinuation* aContinuation);
 
-GMPErr
-GMPEnumRecordNames(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                   void* aUserArg);
-
 #endif // TEST_GMP_STORAGE_H__
--- a/dom/media/gmp/GMPDiskStorage.cpp
+++ b/dom/media/gmp/GMPDiskStorage.cpp
@@ -297,24 +297,16 @@ public:
 
     // Try to sync the file to disk, so that in the event of a crash,
     // the record is less likely to be corrupted.
     PR_Sync(record->mFileDesc);
 
     return GMPNoErr;
   }
 
-  GMPErr GetRecordNames(nsTArray<nsCString>& aOutRecordNames) const override
-  {
-    for (auto iter = mRecords.ConstIter(); !iter.Done(); iter.Next()) {
-      aOutRecordNames.AppendElement(iter.UserData()->mRecordName);
-    }
-    return GMPNoErr;
-  }
-
   void Close(const nsCString& aRecordName) override
   {
     Record* record = nullptr;
     mRecords.Get(aRecordName, &record);
     if (record && !!record->mFileDesc) {
       PR_Close(record->mFileDesc);
       record->mFileDesc = nullptr;
     }
--- a/dom/media/gmp/GMPMemoryStorage.cpp
+++ b/dom/media/gmp/GMPMemoryStorage.cpp
@@ -49,24 +49,16 @@ public:
     Record* record = nullptr;
     if (!mRecords.Get(aRecordName, &record)) {
       return GMPClosedErr;
     }
     record->mData = aBytes;
     return GMPNoErr;
   }
 
-  GMPErr GetRecordNames(nsTArray<nsCString>& aOutRecordNames) const override
-  {
-    for (auto iter = mRecords.ConstIter(); !iter.Done(); iter.Next()) {
-      aOutRecordNames.AppendElement(iter.Key());
-    }
-    return GMPNoErr;
-  }
-
   void Close(const nsCString& aRecordName) override
   {
     Record* record = nullptr;
     if (!mRecords.Get(aRecordName, &record)) {
       return;
     }
     if (!record->mData.Length()) {
       // Record is empty, delete.
--- a/dom/media/gmp/GMPPlatform.cpp
+++ b/dom/media/gmp/GMPPlatform.cpp
@@ -185,31 +185,16 @@ SetTimerOnMainThread(GMPTask* aTask, int
 
 GMPErr
 GetClock(GMPTimestamp* aOutTime)
 {
   *aOutTime = time(0) * 1000;
   return GMPNoErr;
 }
 
-GMPErr
-CreateRecordIterator(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                     void* aUserArg)
-{
-  if (!aRecvIteratorFunc) {
-    return GMPInvalidArgErr;
-  }
-  GMPStorageChild* storage = sChild->GetGMPStorage();
-  if (!storage) {
-    return GMPGenericErr;
-  }
-  MOZ_ASSERT(storage);
-  return storage->EnumerateRecords(aRecvIteratorFunc, aUserArg);
-}
-
 void
 InitPlatformAPI(GMPPlatformAPI& aPlatformAPI, GMPChild* aChild)
 {
   if (!sMainLoop) {
     sMainLoop = MessageLoop::current();
   }
   if (!sChild) {
     sChild = aChild;
@@ -218,17 +203,16 @@ InitPlatformAPI(GMPPlatformAPI& aPlatfor
   aPlatformAPI.version = 0;
   aPlatformAPI.createthread = &CreateThread;
   aPlatformAPI.runonmainthread = &RunOnMainThread;
   aPlatformAPI.syncrunonmainthread = &SyncRunOnMainThread;
   aPlatformAPI.createmutex = &CreateMutex;
   aPlatformAPI.createrecord = &CreateRecord;
   aPlatformAPI.settimer = &SetTimerOnMainThread;
   aPlatformAPI.getcurrenttime = &GetClock;
-  aPlatformAPI.getrecordenumerator = &CreateRecordIterator;
 }
 
 GMPThreadImpl::GMPThreadImpl()
 : mMutex("GMPThreadImpl"),
   mThread("GMPThread")
 {
   MOZ_COUNT_CTOR(GMPThread);
 }
--- a/dom/media/gmp/GMPStorage.h
+++ b/dom/media/gmp/GMPStorage.h
@@ -20,17 +20,16 @@ public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPStorage)
 
   virtual GMPErr Open(const nsCString& aRecordName) = 0;
   virtual bool IsOpen(const nsCString& aRecordName) const = 0;
   virtual GMPErr Read(const nsCString& aRecordName,
                       nsTArray<uint8_t>& aOutBytes) = 0;
   virtual GMPErr Write(const nsCString& aRecordName,
                        const nsTArray<uint8_t>& aBytes) = 0;
-  virtual GMPErr GetRecordNames(nsTArray<nsCString>& aOutRecordNames) const = 0;
   virtual void Close(const nsCString& aRecordName) = 0;
 protected:
   virtual ~GMPStorage() {}
 };
 
 already_AddRefed<GMPStorage> CreateGMPMemoryStorage();
 already_AddRefed<GMPStorage> CreateGMPDiskStorage(const nsCString& aNodeId,
                                                   const nsString& aGMPName);
--- a/dom/media/gmp/GMPStorageChild.cpp
+++ b/dom/media/gmp/GMPStorageChild.cpp
@@ -273,107 +273,24 @@ GMPStorageChild::RecvWriteComplete(const
   if (!record) {
     // Not fatal.
     return IPC_OK();
   }
   record->WriteComplete(aStatus);
   return IPC_OK();
 }
 
-GMPErr
-GMPStorageChild::EnumerateRecords(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                                  void* aUserArg)
-{
-  MonitorAutoLock lock(mMonitor);
-
-  if (mShutdown) {
-    NS_WARNING("GMPStorage used after it's been shutdown!");
-    return GMPClosedErr;
-  }
-
-  MOZ_ASSERT(aRecvIteratorFunc);
-  mPendingRecordIterators.push(RecordIteratorContext(aRecvIteratorFunc, aUserArg));
-
-  CALL_ON_GMP_THREAD(SendGetRecordNames);
-
-  return GMPNoErr;
-}
-
-class GMPRecordIteratorImpl : public GMPRecordIterator {
-public:
-  explicit GMPRecordIteratorImpl(const InfallibleTArray<nsCString>& aRecordNames)
-    : mRecordNames(aRecordNames)
-    , mIndex(0)
-  {
-    mRecordNames.Sort();
-  }
-
-  GMPErr GetName(const char** aOutName, uint32_t* aOutNameLength) override {
-    if (!aOutName || !aOutNameLength) {
-      return GMPInvalidArgErr;
-    }
-    if (mIndex == mRecordNames.Length()) {
-      return GMPEndOfEnumeration;
-    }
-    *aOutName = mRecordNames[mIndex].get();
-    *aOutNameLength = mRecordNames[mIndex].Length();
-    return GMPNoErr;
-  }
-
-  GMPErr NextRecord() override {
-    if (mIndex < mRecordNames.Length()) {
-      mIndex++;
-    }
-    return (mIndex < mRecordNames.Length()) ? GMPNoErr
-                                            : GMPEndOfEnumeration;
-  }
-
-  void Close() override {
-    delete this;
-  }
-
-private:
-  nsTArray<nsCString> mRecordNames;
-  size_t mIndex;
-};
-
-mozilla::ipc::IPCResult
-GMPStorageChild::RecvRecordNames(InfallibleTArray<nsCString>&& aRecordNames,
-                                 const GMPErr& aStatus)
-{
-  RecordIteratorContext ctx;
-  {
-    MonitorAutoLock lock(mMonitor);
-    if (mShutdown || mPendingRecordIterators.empty()) {
-      return IPC_OK();
-    }
-    ctx = mPendingRecordIterators.front();
-    mPendingRecordIterators.pop();
-  }
-
-  if (GMP_FAILED(aStatus)) {
-    ctx.mFunc(nullptr, ctx.mUserArg, aStatus);
-  } else {
-    ctx.mFunc(new GMPRecordIteratorImpl(aRecordNames), ctx.mUserArg, GMPNoErr);
-  }
-
-  return IPC_OK();
-}
-
 mozilla::ipc::IPCResult
 GMPStorageChild::RecvShutdown()
 {
   // Block any new storage requests, and thus any messages back to the
   // parent. We don't delete any objects here, as that may invalidate
   // GMPRecord pointers held by the GMP.
   MonitorAutoLock lock(mMonitor);
   mShutdown = true;
-  while (!mPendingRecordIterators.empty()) {
-    mPendingRecordIterators.pop();
-  }
   return IPC_OK();
 }
 
 } // namespace gmp
 } // namespace mozilla
 
 // avoid redefined macro in unified build
 #undef ON_GMP_THREAD
--- a/dom/media/gmp/GMPStorageChild.h
+++ b/dom/media/gmp/GMPStorageChild.h
@@ -65,54 +65,36 @@ public:
   GMPErr Read(GMPRecordImpl* aRecord);
 
   GMPErr Write(GMPRecordImpl* aRecord,
                const uint8_t* aData,
                uint32_t aDataSize);
 
   GMPErr Close(const nsCString& aRecordName);
 
-  GMPErr EnumerateRecords(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                          void* aUserArg);
-
 private:
   bool HasRecord(const nsCString& aRecordName);
   already_AddRefed<GMPRecordImpl> GetRecord(const nsCString& aRecordName);
 
 protected:
   ~GMPStorageChild() {}
 
   // PGMPStorageChild
   mozilla::ipc::IPCResult RecvOpenComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus) override;
   mozilla::ipc::IPCResult RecvReadComplete(const nsCString& aRecordName,
                                            const GMPErr& aStatus,
                                            InfallibleTArray<uint8_t>&& aBytes) override;
   mozilla::ipc::IPCResult RecvWriteComplete(const nsCString& aRecordName,
                                             const GMPErr& aStatus) override;
-  mozilla::ipc::IPCResult RecvRecordNames(InfallibleTArray<nsCString>&& aRecordNames,
-                                          const GMPErr& aStatus) override;
   mozilla::ipc::IPCResult RecvShutdown() override;
 
 private:
   Monitor mMonitor;
   nsRefPtrHashtable<nsCStringHashKey, GMPRecordImpl> mRecords;
   GMPChild* mPlugin;
-
-  struct RecordIteratorContext {
-    explicit RecordIteratorContext(RecvGMPRecordIteratorPtr aFunc,
-                                   void* aUserArg)
-      : mFunc(aFunc)
-      , mUserArg(aUserArg)
-    {}
-    RecordIteratorContext() {}
-    RecvGMPRecordIteratorPtr mFunc;
-    void* mUserArg;
-  };
-
-  std::queue<RecordIteratorContext> mPendingRecordIterators;
   bool mShutdown;
 };
 
 } // namespace gmp
 } // namespace mozilla
 
 #endif // GMPStorageChild_h_
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -157,34 +157,16 @@ GMPStorageParent::RecvWrite(const nsCStr
         this, aRecordName.get(), rv));
 
   Unused << SendWriteComplete(aRecordName, rv);
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
-GMPStorageParent::RecvGetRecordNames()
-{
-  if (mShutdown) {
-    return IPC_OK();
-  }
-
-  nsTArray<nsCString> recordNames;
-  GMPErr status = mStorage->GetRecordNames(recordNames);
-
-  LOGD(("GMPStorageParent[%p]::RecvGetRecordNames() status=%d numRecords=%d",
-        this, status, recordNames.Length()));
-
-  Unused << SendRecordNames(recordNames, status);
-
-  return IPC_OK();
-}
-
-mozilla::ipc::IPCResult
 GMPStorageParent::RecvClose(const nsCString& aRecordName)
 {
   LOGD(("GMPStorageParent[%p]::RecvClose(record='%s')",
         this, aRecordName.get()));
 
   if (mShutdown) {
     return IPC_OK();
   }
--- a/dom/media/gmp/GMPStorageParent.h
+++ b/dom/media/gmp/GMPStorageParent.h
@@ -23,17 +23,16 @@ public:
   nsresult Init();
   void Shutdown();
 
 protected:
   mozilla::ipc::IPCResult RecvOpen(const nsCString& aRecordName) override;
   mozilla::ipc::IPCResult RecvRead(const nsCString& aRecordName) override;
   mozilla::ipc::IPCResult RecvWrite(const nsCString& aRecordName,
                                     InfallibleTArray<uint8_t>&& aBytes) override;
-  mozilla::ipc::IPCResult RecvGetRecordNames() override;
   mozilla::ipc::IPCResult RecvClose(const nsCString& aRecordName) override;
   void ActorDestroy(ActorDestroyReason aWhy) override;
 
 private:
   ~GMPStorageParent() {}
 
   RefPtr<GMPStorage> mStorage;
 
--- a/dom/media/gmp/PGMPStorage.ipdl
+++ b/dom/media/gmp/PGMPStorage.ipdl
@@ -14,23 +14,21 @@ namespace gmp {
 async protocol PGMPStorage
 {
   manager PGMP;
 
 child:
   async OpenComplete(nsCString aRecordName, GMPErr aStatus);
   async ReadComplete(nsCString aRecordName, GMPErr aStatus, uint8_t[] aBytes);
   async WriteComplete(nsCString aRecordName, GMPErr aStatus);
-  async RecordNames(nsCString[] aRecordNames, GMPErr aStatus);
   async Shutdown();
 
 parent:
   async Open(nsCString aRecordName);
   async Read(nsCString aRecordName);
   async Write(nsCString aRecordName, uint8_t[] aBytes);
   async Close(nsCString aRecordName);
-  async GetRecordNames();
   async __delete__();
 
 };
 
 } // namespace gmp
 } // namespace mozilla
--- a/dom/media/gmp/gmp-api/gmp-platform.h
+++ b/dom/media/gmp/gmp-api/gmp-platform.h
@@ -77,42 +77,25 @@ typedef GMPErr (*GMPCreateRecordPtr)(con
                                      uint32_t aRecordNameSize,
                                      GMPRecord** aOutRecord,
                                      GMPRecordClient* aClient);
 
 // Call on main thread only.
 typedef GMPErr (*GMPSetTimerOnMainThreadPtr)(GMPTask* aTask, int64_t aTimeoutMS);
 typedef GMPErr (*GMPGetCurrentTimePtr)(GMPTimestamp* aOutTime);
 
-typedef void (*RecvGMPRecordIteratorPtr)(GMPRecordIterator* aRecordIterator,
-                                         void* aUserArg,
-                                         GMPErr aStatus);
-
-// Creates a GMPCreateRecordIterator to enumerate the records in storage.
-// When the iterator is ready, the function at aRecvIteratorFunc
-// is called with the GMPRecordIterator as an argument. If the operation
-// fails, RecvGMPRecordIteratorPtr is called with a failure aStatus code.
-// The list that the iterator is covering is fixed when
-// GMPCreateRecordIterator is called, it is *not* updated when changes are
-// made to storage.
-// Iterator begins pointing at first record.
-// aUserArg is passed to the aRecvIteratorFunc upon completion.
-typedef GMPErr (*GMPCreateRecordIteratorPtr)(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                                             void* aUserArg);
-
 struct GMPPlatformAPI {
   // Increment the version when things change. Can only add to the struct,
   // do not change what already exists. Pointers to functions may be NULL
   // when passed to plugins, but beware backwards compat implications of
   // doing that.
   uint16_t version; // Currently version 0
 
   GMPCreateThreadPtr createthread;
   GMPRunOnMainThreadPtr runonmainthread;
   GMPSyncRunOnMainThreadPtr syncrunonmainthread;
   GMPCreateMutexPtr createmutex;
   GMPCreateRecordPtr createrecord;
   GMPSetTimerOnMainThreadPtr settimer;
   GMPGetCurrentTimePtr getcurrenttime;
-  GMPCreateRecordIteratorPtr getrecordenumerator;
 };
 
 #endif // GMP_PLATFORM_h_
--- a/dom/media/gmp/gmp-api/gmp-storage.h
+++ b/dom/media/gmp/gmp-api/gmp-storage.h
@@ -105,37 +105,9 @@ class GMPRecordClient {
   // - GMPGenericErr - Unspecified error.
   // If aStatus is not GMPNoErr, the GMPRecord is unusable, and you must
   // call Close() on the GMPRecord to dispose of it.
   virtual void WriteComplete(GMPErr aStatus) = 0;
 
   virtual ~GMPRecordClient() {}
 };
 
-// Iterates over the records that are available. Note: this list maintains
-// a snapshot of the records that were present when the iterator was created.
-// Create by calling the GMPCreateRecordIteratorPtr function on the
-// GMPPlatformAPI struct.
-// Iteration is in alphabetical order.
-class GMPRecordIterator {
-public:
-  // Retrieve the name for the current record.
-  // aOutName is null terminated at character  at index (*aOutNameLength).
-  // Returns GMPNoErr if successful, or GMPEndOfEnumeration if iteration has
-  // reached the end.
-  virtual GMPErr GetName(const char ** aOutName, uint32_t * aOutNameLength) = 0;
-
-  // Advance iteration to the next record.
-  // Returns GMPNoErr if successful, or GMPEndOfEnumeration if iteration has
-  // reached the end.
-  virtual GMPErr NextRecord() = 0;
-
-  // Signals to the GMP host that the GMP is finished with the
-  // GMPRecordIterator. GMPs must call this to release memory held by
-  // the GMPRecordIterator. Do not access the GMPRecordIterator pointer
-  // after calling this!
-  // Memory retrieved by GetName is *not* valid after calling Close()!
-  virtual void Close() = 0;
-
-  virtual ~GMPRecordIterator() {}
-};
-
 #endif // GMP_STORAGE_h_
--- a/dom/media/gmp/widevine-adapter/WidevineAdapter.h
+++ b/dom/media/gmp/widevine-adapter/WidevineAdapter.h
@@ -45,14 +45,11 @@ GMPErr GMPCreateRecord(const char* aReco
                        GMPRecord** aOutRecord,
                        GMPRecordClient* aClient);
 
 // Call on main thread only.
 GMPErr GMPSetTimerOnMainThread(GMPTask* aTask, int64_t aTimeoutMS);
 
 GMPErr GMPGetCurrentTime(GMPTimestamp* aOutTime);
 
-GMPErr GMPCreateRecordIterator(RecvGMPRecordIteratorPtr aRecvIteratorFunc,
-                               void* aUserArg);
-
 } // namespace mozilla
 
 #endif // WidevineAdapter_h_
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -1103,78 +1103,16 @@ class GMPStorageTest : public GMPDecrypt
 
     CreateDecryptor(NS_LITERAL_STRING("http://example15.com"),
                     NS_LITERAL_STRING("http://example16.com"),
                     false,
                     NS_LITERAL_CSTRING("test-op-apis"));
   }
 #endif
 
-  void TestGetRecordNamesInMemoryStorage() {
-    TestGetRecordNames(true);
-  }
-
-  nsCString mRecordNames;
-
-  void AppendIntPadded(nsACString& aString, uint32_t aInt) {
-    if (aInt > 0 && aInt < 10) {
-      aString.AppendLiteral("0");
-    }
-    aString.AppendInt(aInt);
-  }
-
-  void TestGetRecordNames(bool aPrivateBrowsing) {
-    // Create a number of records of different names.
-    const uint32_t num = 100;
-    nsTArray<nsCString> updates(num);
-    for (uint32_t i = 0; i < num; i++) {
-      nsAutoCString response;
-      response.AppendLiteral("stored data");
-      AppendIntPadded(response, i);
-      response.AppendLiteral(" test-data");
-      AppendIntPadded(response, i);
-
-      if (i != 0) {
-        mRecordNames.AppendLiteral(",");
-      }
-      mRecordNames.AppendLiteral("data");
-      AppendIntPadded(mRecordNames, i);
-
-      nsCString& update = *updates.AppendElement();
-      update.AppendLiteral("store data");
-      AppendIntPadded(update, i);
-      update.AppendLiteral(" test-data");
-      AppendIntPadded(update, i);
-
-      nsCOMPtr<nsIRunnable> continuation;
-      if (i + 1 == num) {
-        continuation =
-          NewRunnableMethod(this, &GMPStorageTest::TestGetRecordNames_QueryNames);
-      }
-      Expect(response, continuation.forget());
-    }
-
-    CreateDecryptor(NS_LITERAL_STRING("http://foo.com"),
-                    NS_LITERAL_STRING("http://bar.com"),
-                    aPrivateBrowsing,
-                    Move(updates));
-  }
-
-  void TestGetRecordNames_QueryNames() {
-    nsCString response("record-names ");
-    response.Append(mRecordNames);
-    Expect(response,
-           NewRunnableMethod(this, &GMPStorageTest::SetFinished));
-    Update(NS_LITERAL_CSTRING("retrieve-record-names"));
-  }
-
-  void GetRecordNamesPersistentStorage() {
-    TestGetRecordNames(false);
-  }
-
   void TestLongRecordNames() {
     NS_NAMED_LITERAL_CSTRING(longRecordName,
       "A_"
       "very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_"
       "very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_"
       "very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_"
       "very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_"
       "very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_"
@@ -1401,22 +1339,12 @@ TEST(GeckoMediaPlugins, GMPStoragePrivat
 
 #if defined(XP_WIN)
 TEST(GeckoMediaPlugins, GMPOutputProtection) {
   RefPtr<GMPStorageTest> runner = new GMPStorageTest();
   runner->DoTest(&GMPStorageTest::TestOutputProtection);
 }
 #endif
 
-TEST(GeckoMediaPlugins, GMPStorageGetRecordNamesInMemoryStorage) {
-  RefPtr<GMPStorageTest> runner = new GMPStorageTest();
-  runner->DoTest(&GMPStorageTest::TestGetRecordNamesInMemoryStorage);
-}
-
-TEST(GeckoMediaPlugins, GMPStorageGetRecordNamesPersistentStorage) {
-  RefPtr<GMPStorageTest> runner = new GMPStorageTest();
-  runner->DoTest(&GMPStorageTest::GetRecordNamesPersistentStorage);
-}
-
 TEST(GeckoMediaPlugins, GMPStorageLongRecordNames) {
   RefPtr<GMPStorageTest> runner = new GMPStorageTest();
   runner->DoTest(&GMPStorageTest::TestLongRecordNames);
 }