Bug 1422856 - Stop using GetNativePath in GMPServiceParent. r?cpearce draft
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 05 Dec 2017 01:05:36 +0900
changeset 707531 12e092e2b1874063d08fc4c7767d6ed1da312546
parent 707530 cbc2ec4e6e863d8b525c34f9335e31ed424318b0
child 707532 26df802590a2288a040c1832eec0cd1630b6326a
push id92142
push userVYV03354@nifty.ne.jp
push dateTue, 05 Dec 2017 13:10:45 +0000
reviewerscpearce
bugs1422856
milestone59.0a1
Bug 1422856 - Stop using GetNativePath in GMPServiceParent. r?cpearce MozReview-Commit-ID: 2zr2RfZOPYs
dom/media/gmp/GMPServiceParent.cpp
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -970,22 +970,20 @@ static void Dummy(RefPtr<GMPParent>& aOn
 }
 
 void
 GeckoMediaPluginServiceParent::PluginTerminated(const RefPtr<GMPParent>& aPlugin)
 {
   MOZ_ASSERT(mGMPThread->EventTarget()->IsOnCurrentThread());
 
   if (aPlugin->IsMarkedForDeletion()) {
-    nsCString path8;
+    nsString path;
     RefPtr<nsIFile> dir = aPlugin->GetDirectory();
-    nsresult rv = dir->GetNativePath(path8);
+    nsresult rv = dir->GetPath(path);
     NS_ENSURE_SUCCESS_VOID(rv);
-
-    nsString path = NS_ConvertUTF8toUTF16(path8);
     if (mPluginsWaitingForDeletion.Contains(path)) {
       RemoveOnGMPThread(path, true /* delete */, true /* can defer */);
     }
   }
 }
 
 void
 GeckoMediaPluginServiceParent::ReAddOnGMPThread(const RefPtr<GMPParent>& aOld)