Bug 1650607 - Do not replace / with : in File constructor. r=baku
authorTom Schuster <evilpies@gmail.com>
Mon, 17 Aug 2020 09:52:14 +0000
changeset 609597 5e87f862c24b0211719358128ff30fee9e877622
parent 609596 8e7a809757be330ad84b822c7e2937a7ec8cac90
child 609598 365ae38a5bca68e4d8c8cf25b8f5230e306b0f09
push id13553
push userffxbld-merge
push dateMon, 24 Aug 2020 12:51:36 +0000
treeherdermozilla-beta@a54f8b5d0977 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1650607
milestone81.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1650607 - Do not replace / with : in File constructor. r=baku Basically a backout of https://hg.mozilla.org/mozilla-central/rev/1857e763332c. Pending spec change: https://github.com/w3c/FileAPI/issues/41 Differential Revision: https://phabricator.services.mozilla.com/D86981
dom/file/File.cpp
--- a/dom/file/File.cpp
+++ b/dom/file/File.cpp
@@ -130,21 +130,17 @@ void File::GetMozFullPathInternal(nsAStr
 }
 
 /* static */
 already_AddRefed<File> File::Constructor(const GlobalObject& aGlobal,
                                          const Sequence<BlobPart>& aData,
                                          const nsAString& aName,
                                          const FilePropertyBag& aBag,
                                          ErrorResult& aRv) {
-  // Normalizing the filename
-  nsString name(aName);
-  name.ReplaceChar('/', ':');
-
-  RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(name);
+  RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(aName);
 
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   MOZ_ASSERT(global);
 
   nsAutoString type(aBag.mType);
   MakeValidBlobType(type);
   impl->InitializeBlob(aData, type, aBag.mEndings == EndingType::Native,
                        global->CrossOriginIsolated(), aRv);