Backed out 5 changesets (bug 1534712, bug 1545758) for test_ext_webrequest_upload.html failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Thu, 25 Apr 2019 12:36:51 +0300
changeset 530074 a8478ef589e070357d07e90ff7c0fec2084c41e9
parent 530073 bc48855c4da8d60630f8d384cda0e6e2834f5f7b
child 530075 3328e1d9b48e983f26beaf694da687b460112d89
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1534712, 1545758
milestone68.0a1
backs out447b0f5a5802dd6b352ddae1d8e0b8c0430ce2fd
0528f8f11814eefe9eb5d958392c6cda8b932ad2
d85c68071b5452552c3a85eaee41f58b95c7a2e3
10b380bc5b0cc8e6dcb6f9553e705d2852c0a3e3
57136f4e7b54a2956b71be4db549473f33bd22dc
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
Backed out 5 changesets (bug 1534712, bug 1545758) for test_ext_webrequest_upload.html failures CLOSED TREE Backed out changeset 447b0f5a5802 (bug 1545758) Backed out changeset 0528f8f11814 (bug 1545758) Backed out changeset d85c68071b54 (bug 1545758) Backed out changeset 10b380bc5b0c (bug 1545758) Backed out changeset 57136f4e7b54 (bug 1534712)
dom/file/BaseBlobImpl.cpp
dom/file/BaseBlobImpl.h
dom/file/BlobImpl.h
dom/file/File.cpp
dom/file/File.h
dom/file/FileBlobImpl.cpp
dom/file/FileBlobImpl.h
dom/file/FileCreatorHelper.cpp
dom/file/FileCreatorHelper.h
dom/file/MultipartBlobImpl.cpp
dom/file/MultipartBlobImpl.h
dom/file/MutableBlobStorage.cpp
dom/file/StreamBlobImpl.h
dom/file/ipc/FileCreatorChild.cpp
dom/file/ipc/FileCreatorChild.h
dom/file/ipc/FileCreatorParent.cpp
dom/file/ipc/FileCreatorParent.h
dom/file/ipc/IPCBlobInputStream.h
dom/file/ipc/IPCBlobInputStreamChild.h
dom/file/ipc/IPCBlobInputStreamParent.h
dom/file/ipc/IPCBlobInputStreamStorage.h
dom/file/ipc/PFileCreator.ipdl
dom/file/ipc/PIPCBlobInputStream.ipdl
dom/file/ipc/PPendingIPCBlob.ipdl
dom/file/ipc/PTemporaryIPCBlob.ipdl
dom/file/ipc/PendingIPCBlobChild.h
dom/file/ipc/PendingIPCBlobParent.h
dom/file/ipc/TemporaryIPCBlobChild.h
dom/file/ipc/TemporaryIPCBlobParent.h
dom/file/ipc/moz.build
dom/filehandle/ActorsParent.cpp
dom/indexedDB/ActorsChild.cpp
dom/indexedDB/ActorsParent.cpp
dom/indexedDB/FileSnapshot.h
dom/ipc/ContentChild.cpp
dom/ipc/ContentChild.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
ipc/glue/BackgroundChildImpl.cpp
ipc/glue/BackgroundChildImpl.h
ipc/glue/BackgroundParentImpl.cpp
ipc/glue/BackgroundParentImpl.h
ipc/glue/InputStreamUtils.cpp
ipc/glue/PBackground.ipdl
ipc/ipdl/ipdl/direct_call.py
layout/build/nsLayoutStatics.cpp
modules/libpref/init/StaticPrefList.h
--- a/dom/file/BaseBlobImpl.cpp
+++ b/dom/file/BaseBlobImpl.cpp
@@ -23,24 +23,24 @@ void BaseBlobImpl::GetDOMPath(nsAString&
 
 void BaseBlobImpl::SetDOMPath(const nsAString& aPath) {
   MOZ_ASSERT(mIsFile, "Should only be called on files");
   mPath = aPath;
 }
 
 void BaseBlobImpl::GetMozFullPath(nsAString& aFileName,
                                   SystemCallerGuarantee /* unused */,
-                                  ErrorResult& aRv) {
+                                  ErrorResult& aRv) const {
   MOZ_ASSERT(mIsFile, "Should only be called on files");
 
   GetMozFullPathInternal(aFileName, aRv);
 }
 
 void BaseBlobImpl::GetMozFullPathInternal(nsAString& aFileName,
-                                          ErrorResult& aRv) {
+                                          ErrorResult& aRv) const {
   if (!mIsFile) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aFileName.Truncate();
 }
 
--- a/dom/file/BaseBlobImpl.h
+++ b/dom/file/BaseBlobImpl.h
@@ -81,20 +81,20 @@ class BaseBlobImpl : public BlobImpl {
   virtual void SetDOMPath(const nsAString& aName) override;
 
   virtual int64_t GetLastModified(ErrorResult& aRv) override;
 
   virtual void SetLastModified(int64_t aLastModified) override;
 
   virtual void GetMozFullPath(nsAString& aName,
                               SystemCallerGuarantee /* unused */,
-                              ErrorResult& aRv) override;
+                              ErrorResult& aRv) const override;
 
   virtual void GetMozFullPathInternal(nsAString& aFileName,
-                                      ErrorResult& aRv) override;
+                                      ErrorResult& aRv) const override;
 
   virtual uint64_t GetSize(ErrorResult& aRv) override { return mLength; }
 
   virtual void GetType(nsAString& aType) override;
 
   size_t GetAllocationSize() const override { return 0; }
 
   size_t GetAllocationSize(
--- a/dom/file/BlobImpl.h
+++ b/dom/file/BlobImpl.h
@@ -40,20 +40,20 @@ class BlobImpl : public nsISupports {
   virtual void SetDOMPath(const nsAString& aName) = 0;
 
   virtual int64_t GetLastModified(ErrorResult& aRv) = 0;
 
   virtual void SetLastModified(int64_t aLastModified) = 0;
 
   virtual void GetMozFullPath(nsAString& aName,
                               SystemCallerGuarantee /* unused */,
-                              ErrorResult& aRv) = 0;
+                              ErrorResult& aRv) const = 0;
 
   virtual void GetMozFullPathInternal(nsAString& aFileName,
-                                      ErrorResult& aRv) = 0;
+                                      ErrorResult& aRv) const = 0;
 
   virtual uint64_t GetSize(ErrorResult& aRv) = 0;
 
   virtual void GetType(nsAString& aType) = 0;
 
   virtual void GetBlobImplType(nsAString& aBlobImplType) const = 0;
 
   virtual size_t GetAllocationSize() const = 0;
--- a/dom/file/File.cpp
+++ b/dom/file/File.cpp
@@ -95,21 +95,23 @@ void File::GetRelativePath(nsAString& aP
   }
 }
 
 int64_t File::GetLastModified(ErrorResult& aRv) {
   return mImpl->GetLastModified(aRv);
 }
 
 void File::GetMozFullPath(nsAString& aFilename,
-                          SystemCallerGuarantee aGuarantee, ErrorResult& aRv) {
+                          SystemCallerGuarantee aGuarantee,
+                          ErrorResult& aRv) const {
   mImpl->GetMozFullPath(aFilename, aGuarantee, aRv);
 }
 
-void File::GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) {
+void File::GetMozFullPathInternal(nsAString& aFileName,
+                                  ErrorResult& aRv) const {
   mImpl->GetMozFullPathInternal(aFileName, aRv);
 }
 
 /* static */
 already_AddRefed<File> File::Constructor(const GlobalObject& aGlobal,
                                          const Sequence<BlobPart>& aData,
                                          const nsAString& aName,
                                          const FilePropertyBag& aBag,
--- a/dom/file/File.h
+++ b/dom/file/File.h
@@ -83,19 +83,19 @@ class File final : public Blob {
 
   void GetName(nsAString& aName) const;
 
   int64_t GetLastModified(ErrorResult& aRv);
 
   void GetRelativePath(nsAString& aPath) const;
 
   void GetMozFullPath(nsAString& aFilename, SystemCallerGuarantee aGuarantee,
-                      ErrorResult& aRv);
+                      ErrorResult& aRv) const;
 
-  void GetMozFullPathInternal(nsAString& aName, ErrorResult& aRv);
+  void GetMozFullPathInternal(nsAString& aName, ErrorResult& aRv) const;
 
  protected:
   virtual bool HasFileInterface() const override { return true; }
 
  private:
   // File constructor should never be used directly. Use Blob::Create or
   // File::Create.
   File(nsISupports* aParent, BlobImpl* aImpl);
--- a/dom/file/FileBlobImpl.cpp
+++ b/dom/file/FileBlobImpl.cpp
@@ -17,105 +17,87 @@
 
 namespace mozilla {
 namespace dom {
 
 FileBlobImpl::FileBlobImpl(nsIFile* aFile)
     : BaseBlobImpl(NS_LITERAL_STRING("FileBlobImpl"), EmptyString(),
                    EmptyString(), UINT64_MAX, INT64_MAX),
       mFile(aFile),
-      mFileId(-1),
-      mWholeFile(true) {
+      mWholeFile(true),
+      mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
   // Lazily get the content type and size
   mContentType.SetIsVoid(true);
-  mMozFullPath.SetIsVoid(true);
   mFile->GetLeafName(mName);
 }
 
 FileBlobImpl::FileBlobImpl(const nsAString& aName,
                            const nsAString& aContentType, uint64_t aLength,
                            nsIFile* aFile)
     : BaseBlobImpl(NS_LITERAL_STRING("FileBlobImpl"), aName, aContentType,
                    aLength, UINT64_MAX),
       mFile(aFile),
-      mFileId(-1),
-      mWholeFile(true) {
+      mWholeFile(true),
+      mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
-  mMozFullPath.SetIsVoid(true);
 }
 
 FileBlobImpl::FileBlobImpl(const nsAString& aName,
                            const nsAString& aContentType, uint64_t aLength,
                            nsIFile* aFile, int64_t aLastModificationDate)
     : BaseBlobImpl(NS_LITERAL_STRING("FileBlobImpl"), aName, aContentType,
                    aLength, aLastModificationDate),
       mFile(aFile),
-      mFileId(-1),
-      mWholeFile(true) {
+      mWholeFile(true),
+      mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
-  mMozFullPath.SetIsVoid(true);
 }
 
 FileBlobImpl::FileBlobImpl(nsIFile* aFile, const nsAString& aName,
                            const nsAString& aContentType,
                            const nsAString& aBlobImplType)
     : BaseBlobImpl(aBlobImplType, aName, aContentType, UINT64_MAX, INT64_MAX),
       mFile(aFile),
-      mFileId(-1),
-      mWholeFile(true) {
+      mWholeFile(true),
+      mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
   if (aContentType.IsEmpty()) {
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
   }
-
-  mMozFullPath.SetIsVoid(true);
 }
 
 FileBlobImpl::FileBlobImpl(const FileBlobImpl* aOther, uint64_t aStart,
                            uint64_t aLength, const nsAString& aContentType)
     : BaseBlobImpl(NS_LITERAL_STRING("FileBlobImpl"), aContentType,
                    aOther->mStart + aStart, aLength),
       mFile(aOther->mFile),
-      mFileId(-1),
-      mWholeFile(false) {
+      mWholeFile(false),
+      mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
   mImmutable = aOther->mImmutable;
-  mMozFullPath = aOther->mMozFullPath;
 }
 
 already_AddRefed<BlobImpl> FileBlobImpl::CreateSlice(
     uint64_t aStart, uint64_t aLength, const nsAString& aContentType,
     ErrorResult& aRv) {
-  RefPtr<FileBlobImpl> impl =
-      new FileBlobImpl(this, aStart, aLength, aContentType);
+  RefPtr<BlobImpl> impl = new FileBlobImpl(this, aStart, aLength, aContentType);
   return impl.forget();
 }
 
 void FileBlobImpl::GetMozFullPathInternal(nsAString& aFilename,
-                                          ErrorResult& aRv) {
+                                          ErrorResult& aRv) const {
   MOZ_ASSERT(mIsFile, "Should only be called on files");
-
-  if (!mMozFullPath.IsVoid()) {
-    aFilename = mMozFullPath;
-    return;
-  }
-
   aRv = mFile->GetPath(aFilename);
-  if (NS_WARN_IF(aRv.Failed())) {
-    return;
-  }
-
-  mMozFullPath = aFilename;
 }
 
 uint64_t FileBlobImpl::GetSize(ErrorResult& aRv) {
   if (BaseBlobImpl::IsSizeUnknown()) {
     MOZ_ASSERT(mWholeFile,
                "Should only use lazy size when using the whole file");
     int64_t fileSize;
     aRv = mFile->GetFileSize(&fileSize);
@@ -218,16 +200,20 @@ int64_t FileBlobImpl::GetLastModified(Er
     }
 
     mLastModificationDate = msecs;
   }
 
   return mLastModificationDate;
 }
 
+void FileBlobImpl::SetLastModified(int64_t aLastModified) {
+  MOZ_CRASH("SetLastModified of a real file is not allowed!");
+}
+
 const uint32_t sFileStreamFlags =
     nsIFileInputStream::CLOSE_ON_EOF | nsIFileInputStream::REOPEN_ON_REWIND |
     nsIFileInputStream::DEFER_OPEN | nsIFileInputStream::SHARE_DELETE;
 
 void FileBlobImpl::CreateInputStream(nsIInputStream** aStream,
                                      ErrorResult& aRv) {
   nsCOMPtr<nsIInputStream> stream;
   aRv = NS_NewLocalFileInputStream(getter_AddRefs(stream), mFile, -1, -1,
--- a/dom/file/FileBlobImpl.h
+++ b/dom/file/FileBlobImpl.h
@@ -32,18 +32,19 @@ class FileBlobImpl : public BaseBlobImpl
   FileBlobImpl(
       nsIFile* aFile, const nsAString& aName, const nsAString& aContentType,
       const nsAString& aBlobImplType = NS_LITERAL_STRING("FileBlobImpl"));
 
   // Overrides
   virtual uint64_t GetSize(ErrorResult& aRv) override;
   virtual void GetType(nsAString& aType) override;
   virtual int64_t GetLastModified(ErrorResult& aRv) override;
+  virtual void SetLastModified(int64_t aLastModified) override;
   virtual void GetMozFullPathInternal(nsAString& aFullPath,
-                                      ErrorResult& aRv) override;
+                                      ErrorResult& aRv) const override;
   virtual void CreateInputStream(nsIInputStream** aInputStream,
                                  ErrorResult& aRv) override;
 
   virtual bool IsDirectory() const override;
 
   // We always have size and date for this kind of blob.
   virtual bool IsSizeUnknown() const override { return false; }
   virtual bool IsDateUnknown() const override { return false; }
@@ -51,34 +52,29 @@ class FileBlobImpl : public BaseBlobImpl
   void SetName(const nsAString& aName) { mName = aName; }
 
   void SetType(const nsAString& aType) { mContentType = aType; }
 
   int64_t GetFileId() override { return mFileId; }
 
   void SetFileId(int64_t aFileId) { mFileId = aFileId; }
 
-  void SetEmptySize() { mLength = 0; }
-
-  void SetMozFullPath(const nsAString& aPath) { mMozFullPath = aPath; }
-
  protected:
   virtual ~FileBlobImpl() = default;
 
   // Create slice
   FileBlobImpl(const FileBlobImpl* aOther, uint64_t aStart, uint64_t aLength,
                const nsAString& aContentType);
 
   virtual already_AddRefed<BlobImpl> CreateSlice(uint64_t aStart,
                                                  uint64_t aLength,
                                                  const nsAString& aContentType,
                                                  ErrorResult& aRv) override;
 
   nsCOMPtr<nsIFile> mFile;
-  nsString mMozFullPath;
+  bool mWholeFile;
   int64_t mFileId;
-  bool mWholeFile;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_FileBlobImpl_h
--- a/dom/file/FileCreatorHelper.cpp
+++ b/dom/file/FileCreatorHelper.cpp
@@ -2,26 +2,23 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FileCreatorHelper.h"
 
 #include "mozilla/dom/BindingDeclarations.h"
+#include "mozilla/dom/ContentChild.h"
+#include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/FileBinding.h"
-#include "mozilla/dom/FileCreatorChild.h"
-#include "mozilla/ipc/BackgroundChild.h"
-#include "mozilla/ipc/PBackgroundChild.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/Promise.h"
-#include "mozilla/StaticPrefs.h"
 #include "nsContentUtils.h"
 #include "nsPIDOMWindow.h"
-#include "nsProxyRelease.h"
 #include "nsIFile.h"
 
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
 #  undef CreateFile
 #endif
 
@@ -34,37 +31,173 @@ already_AddRefed<Promise> FileCreatorHel
     const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv) {
   MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());
 
   RefPtr<Promise> promise = Promise::Create(aGlobalObject, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
-  nsAutoString path;
-  aRv = aFile->GetPath(path);
+  nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobalObject);
+
+  // Parent process
+
+  if (XRE_IsParentProcess()) {
+    RefPtr<File> file =
+        CreateFileInternal(window, aFile, aBag, aIsFromNsIFile, aRv);
+    if (aRv.Failed()) {
+      return nullptr;
+    }
+    promise->MaybeResolve(file);
+    return promise.forget();
+  }
+
+  // Content process.
+
+  ContentChild* cc = ContentChild::GetSingleton();
+  if (!cc) {
+    promise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR);
+    return promise.forget();
+  }
+
+  if (!cc->GetRemoteType().EqualsLiteral(FILE_REMOTE_TYPE) &&
+      !Preferences::GetBool("dom.file.createInChild", false)) {
+    // If this pref is not set and the request is received by the parent
+    // process, this child is killed for security reason.
+    promise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR);
+    return promise.forget();
+  }
+
+  RefPtr<FileCreatorHelper> helper = new FileCreatorHelper(promise, window);
+
+  // The request is sent to the parent process and it's kept alive by
+  // ContentChild.
+  helper->SendRequest(aFile, aBag, aIsFromNsIFile, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
-  // Register this component to PBackground.
-  mozilla::ipc::PBackgroundChild* actorChild =
-      mozilla::ipc::BackgroundChild::GetOrCreateForCurrentThread();
-  if (NS_WARN_IF(!actorChild)) {
-    aRv.Throw(NS_ERROR_FAILURE);
+  return promise.forget();
+}
+
+/* static */
+already_AddRefed<File> FileCreatorHelper::CreateFileInternal(
+    nsPIDOMWindowInner* aWindow, nsIFile* aFile,
+    const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv) {
+  bool lastModifiedPassed = false;
+  int64_t lastModified = 0;
+  if (aBag.mLastModified.WasPassed()) {
+    lastModifiedPassed = true;
+    lastModified = aBag.mLastModified.Value();
+  }
+
+  RefPtr<BlobImpl> blobImpl;
+  aRv = CreateBlobImpl(aFile, aBag.mType, aBag.mName, lastModifiedPassed,
+                       lastModified, aBag.mExistenceCheck, aIsFromNsIFile,
+                       getter_AddRefs(blobImpl));
+  if (aRv.Failed()) {
     return nullptr;
   }
 
-  Maybe<int64_t> lastModified;
-  if (aBag.mLastModified.WasPassed()) {
-    lastModified.emplace(aBag.mLastModified.Value());
+  RefPtr<File> file = File::Create(aWindow, blobImpl);
+  return file.forget();
+}
+
+FileCreatorHelper::FileCreatorHelper(Promise* aPromise,
+                                     nsPIDOMWindowInner* aWindow)
+    : mPromise(aPromise), mWindow(aWindow) {
+  MOZ_ASSERT(aPromise);
+}
+
+FileCreatorHelper::~FileCreatorHelper() {}
+
+void FileCreatorHelper::SendRequest(nsIFile* aFile,
+                                    const ChromeFilePropertyBag& aBag,
+                                    bool aIsFromNsIFile, ErrorResult& aRv) {
+  MOZ_ASSERT(aFile);
+
+  ContentChild* cc = ContentChild::GetSingleton();
+  if (NS_WARN_IF(!cc)) {
+    aRv.Throw(NS_ERROR_FAILURE);
+    return;
+  }
+
+  nsID uuid;
+  aRv = nsContentUtils::GenerateUUIDInPlace(uuid);
+  if (NS_WARN_IF(aRv.Failed())) {
+    return;
+  }
+
+  nsAutoString path;
+  aRv = aFile->GetPath(path);
+  if (NS_WARN_IF(aRv.Failed())) {
+    return;
+  }
+
+  cc->FileCreationRequest(uuid, this, path, aBag.mType, aBag.mName,
+                          aBag.mLastModified, aBag.mExistenceCheck,
+                          aIsFromNsIFile);
+}
+
+void FileCreatorHelper::ResponseReceived(BlobImpl* aBlobImpl, nsresult aRv) {
+  if (NS_FAILED(aRv)) {
+    mPromise->MaybeReject(aRv);
+    return;
   }
 
-  PFileCreatorChild* actor = actorChild->SendPFileCreatorConstructor(
-      path, aBag.mType, aBag.mName, lastModified, aBag.mExistenceCheck,
-      aIsFromNsIFile);
+  RefPtr<File> file = File::Create(mWindow, aBlobImpl);
+  mPromise->MaybeResolve(file);
+}
+
+/* static */
+nsresult FileCreatorHelper::CreateBlobImplForIPC(
+    const nsAString& aPath, const nsAString& aType, const nsAString& aName,
+    bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
+    bool aIsFromNsIFile, BlobImpl** aBlobImpl) {
+  nsCOMPtr<nsIFile> file;
+  nsresult rv = NS_NewLocalFile(aPath, true, getter_AddRefs(file));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  return CreateBlobImpl(file, aType, aName, aLastModifiedPassed, aLastModified,
+                        aExistenceCheck, aIsFromNsIFile, aBlobImpl);
+}
+
+/* static */
+nsresult FileCreatorHelper::CreateBlobImpl(
+    nsIFile* aFile, const nsAString& aType, const nsAString& aName,
+    bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
+    bool aIsFromNsIFile, BlobImpl** aBlobImpl) {
+  if (!aExistenceCheck) {
+    RefPtr<FileBlobImpl> impl = new FileBlobImpl(aFile);
 
-  static_cast<FileCreatorChild*>(actor)->SetPromise(promise);
-  return promise.forget();
+    if (!aName.IsEmpty()) {
+      impl->SetName(aName);
+    }
+
+    if (!aType.IsEmpty()) {
+      impl->SetType(aType);
+    }
+
+    if (aLastModifiedPassed) {
+      impl->SetLastModified(aLastModified);
+    }
+
+    impl.forget(aBlobImpl);
+    return NS_OK;
+  }
+
+  RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(EmptyString());
+  nsresult rv = impl->InitializeChromeFile(
+      aFile, aType, aName, aLastModifiedPassed, aLastModified, aIsFromNsIFile);
+  if (NS_FAILED(rv)) {
+    return rv;
+  }
+
+  MOZ_ASSERT(impl->IsFile());
+
+  impl.forget(aBlobImpl);
+  return NS_OK;
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/file/FileCreatorHelper.h
+++ b/dom/file/FileCreatorHelper.h
@@ -15,28 +15,60 @@
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
 #  undef CreateFile
 #endif
 
 class nsIFile;
 class nsIGlobalObject;
+class nsPIDOMWindowInner;
 
 namespace mozilla {
 namespace dom {
 
 struct ChromeFilePropertyBag;
 class Promise;
+class File;
 
 class FileCreatorHelper final {
  public:
+  NS_INLINE_DECL_REFCOUNTING(FileCreatorHelper);
+
   static already_AddRefed<Promise> CreateFile(nsIGlobalObject* aGlobalObject,
                                               nsIFile* aFile,
                                               const ChromeFilePropertyBag& aBag,
                                               bool aIsFromNsIFile,
                                               ErrorResult& aRv);
+
+  void ResponseReceived(BlobImpl* aBlobImpl, nsresult aRv);
+
+  // For IPC only
+  static nsresult CreateBlobImplForIPC(
+      const nsAString& aPath, const nsAString& aType, const nsAString& aName,
+      bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
+      bool aIsFromNsIFile, BlobImpl** aBlobImpl);
+
+ private:
+  static already_AddRefed<File> CreateFileInternal(
+      nsPIDOMWindowInner* aWindow, nsIFile* aFile,
+      const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv);
+
+  static nsresult CreateBlobImpl(nsIFile* aFile, const nsAString& aType,
+                                 const nsAString& aName,
+                                 bool aLastModifiedPassed,
+                                 int64_t aLastModified, bool aExistenceCheck,
+                                 bool aIsFromNsIFile, BlobImpl** aBlobImpl);
+
+  FileCreatorHelper(Promise* aPromise, nsPIDOMWindowInner* aWindow);
+  ~FileCreatorHelper();
+
+  void SendRequest(nsIFile* aFile, const ChromeFilePropertyBag& aBag,
+                   bool aIsFromNsIFile, ErrorResult& aRv);
+
+  RefPtr<Promise> mPromise;
+  nsCOMPtr<nsPIDOMWindowInner> mWindow;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_FileCreatorHelper_h
--- a/dom/file/MultipartBlobImpl.cpp
+++ b/dom/file/MultipartBlobImpl.cpp
@@ -269,16 +269,32 @@ void MultipartBlobImpl::SetLengthAndModi
     // could fail.
     mLastModificationDate = nsRFPService::ReduceTimePrecisionAsUSecs(
         lastModifiedSet ? lastModified * PR_USEC_PER_MSEC : JS_Now(), 0);
     // mLastModificationDate is an absolute timestamp so we supply a zero
     // context mix-in
   }
 }
 
+void MultipartBlobImpl::GetMozFullPathInternal(nsAString& aFilename,
+                                               ErrorResult& aRv) const {
+  if (!mIsFromNsIFile || mBlobImpls.Length() == 0) {
+    BaseBlobImpl::GetMozFullPathInternal(aFilename, aRv);
+    return;
+  }
+
+  BlobImpl* blobImpl = mBlobImpls.ElementAt(0).get();
+  if (!blobImpl) {
+    BaseBlobImpl::GetMozFullPathInternal(aFilename, aRv);
+    return;
+  }
+
+  blobImpl->GetMozFullPathInternal(aFilename, aRv);
+}
+
 nsresult MultipartBlobImpl::SetMutable(bool aMutable) {
   nsresult rv;
 
   // This looks a little sketchy since BlobImpl objects are supposed to be
   // threadsafe. However, we try to enforce that all BlobImpl objects must be
   // set to immutable *before* being passed to another thread, so this should
   // be safe.
   if (!aMutable && !mImmutable && !mBlobImpls.IsEmpty()) {
@@ -296,16 +312,92 @@ nsresult MultipartBlobImpl::SetMutable(b
     return rv;
   }
 
   MOZ_ASSERT_IF(!aMutable, mImmutable);
 
   return NS_OK;
 }
 
+nsresult MultipartBlobImpl::InitializeChromeFile(
+    nsIFile* aFile, const nsAString& aType, const nsAString& aName,
+    bool aLastModifiedPassed, int64_t aLastModified, bool aIsFromNsIFile) {
+  MOZ_ASSERT(!mImmutable, "Something went wrong ...");
+  if (mImmutable) {
+    return NS_ERROR_UNEXPECTED;
+  }
+
+  mName = aName;
+  mContentType = aType;
+  mIsFromNsIFile = aIsFromNsIFile;
+
+  bool exists;
+  nsresult rv = aFile->Exists(&exists);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  if (!exists) {
+    return NS_ERROR_FILE_NOT_FOUND;
+  }
+
+  bool isDir;
+  rv = aFile->IsDirectory(&isDir);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  if (isDir) {
+    return NS_ERROR_FILE_IS_DIRECTORY;
+  }
+
+  if (mName.IsEmpty()) {
+    aFile->GetLeafName(mName);
+  }
+
+  RefPtr<File> blob = File::CreateFromFile(nullptr, aFile);
+
+  // Pre-cache size.
+  ErrorResult error;
+  blob->GetSize(error);
+  if (NS_WARN_IF(error.Failed())) {
+    return error.StealNSResult();
+  }
+
+  // Pre-cache modified date.
+  blob->GetLastModified(error);
+  if (NS_WARN_IF(error.Failed())) {
+    return error.StealNSResult();
+  }
+
+  // XXXkhuey this is terrible
+  if (mContentType.IsEmpty()) {
+    blob->GetType(mContentType);
+  }
+
+  BlobSet blobSet;
+  rv = blobSet.AppendBlobImpl(static_cast<File*>(blob.get())->Impl());
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    return rv;
+  }
+
+  mBlobImpls = blobSet.GetBlobImpls();
+
+  SetLengthAndModifiedDate(error);
+  if (NS_WARN_IF(error.Failed())) {
+    return error.StealNSResult();
+  }
+
+  if (aLastModifiedPassed) {
+    SetLastModified(aLastModified);
+  }
+
+  return NS_OK;
+}
+
 bool MultipartBlobImpl::MayBeClonedToOtherThreads() const {
   for (uint32_t i = 0; i < mBlobImpls.Length(); ++i) {
     if (!mBlobImpls[i]->MayBeClonedToOtherThreads()) {
       return false;
     }
   }
 
   return true;
--- a/dom/file/MultipartBlobImpl.h
+++ b/dom/file/MultipartBlobImpl.h
@@ -27,43 +27,53 @@ class MultipartBlobImpl final : public B
   // Create as a blob
   static already_AddRefed<MultipartBlobImpl> Create(
       nsTArray<RefPtr<BlobImpl>>&& aBlobImpls, const nsAString& aContentType,
       ErrorResult& aRv);
 
   // Create as a file to be later initialized
   explicit MultipartBlobImpl(const nsAString& aName)
       : BaseBlobImpl(NS_LITERAL_STRING("MultipartBlobImpl"), aName,
-                     EmptyString(), UINT64_MAX) {}
+                     EmptyString(), UINT64_MAX),
+        mIsFromNsIFile(false) {}
 
   // Create as a blob to be later initialized
   MultipartBlobImpl()
       : BaseBlobImpl(NS_LITERAL_STRING("MultipartBlobImpl"), EmptyString(),
-                     UINT64_MAX) {}
+                     UINT64_MAX),
+        mIsFromNsIFile(false) {}
 
   void InitializeBlob(ErrorResult& aRv);
 
   void InitializeBlob(const Sequence<Blob::BlobPart>& aData,
                       const nsAString& aContentType, bool aNativeEOL,
                       ErrorResult& aRv);
 
+  nsresult InitializeChromeFile(nsIFile* aData, const nsAString& aType,
+                                const nsAString& aName,
+                                bool aLastModifiedPassed, int64_t aLastModified,
+                                bool aIsFromNsIFile);
+
   virtual already_AddRefed<BlobImpl> CreateSlice(uint64_t aStart,
                                                  uint64_t aLength,
                                                  const nsAString& aContentType,
                                                  ErrorResult& aRv) override;
 
   virtual uint64_t GetSize(ErrorResult& aRv) override { return mLength; }
 
   virtual void CreateInputStream(nsIInputStream** aInputStream,
                                  ErrorResult& aRv) override;
 
   virtual const nsTArray<RefPtr<BlobImpl>>* GetSubBlobImpls() const override {
     return mBlobImpls.Length() ? &mBlobImpls : nullptr;
   }
 
+  virtual void GetMozFullPathInternal(nsAString& aFullPath,
+                                      ErrorResult& aRv) const override;
+
   virtual nsresult SetMutable(bool aMutable) override;
 
   void SetName(const nsAString& aName) { mName = aName; }
 
   virtual bool MayBeClonedToOtherThreads() const override;
 
   size_t GetAllocationSize() const override;
   size_t GetAllocationSize(
@@ -71,27 +81,30 @@ class MultipartBlobImpl final : public B
 
   void GetBlobImplType(nsAString& aBlobImplType) const override;
 
  protected:
   MultipartBlobImpl(nsTArray<RefPtr<BlobImpl>>&& aBlobImpls,
                     const nsAString& aName, const nsAString& aContentType)
       : BaseBlobImpl(NS_LITERAL_STRING("MultipartBlobImpl"), aName,
                      aContentType, UINT64_MAX),
-        mBlobImpls(std::move(aBlobImpls)) {}
+        mBlobImpls(std::move(aBlobImpls)),
+        mIsFromNsIFile(false) {}
 
   MultipartBlobImpl(nsTArray<RefPtr<BlobImpl>>&& aBlobImpls,
                     const nsAString& aContentType)
       : BaseBlobImpl(NS_LITERAL_STRING("MultipartBlobImpl"), aContentType,
                      UINT64_MAX),
-        mBlobImpls(std::move(aBlobImpls)) {}
+        mBlobImpls(std::move(aBlobImpls)),
+        mIsFromNsIFile(false) {}
 
   virtual ~MultipartBlobImpl() {}
 
   void SetLengthAndModifiedDate(ErrorResult& aRv);
 
   nsTArray<RefPtr<BlobImpl>> mBlobImpls;
+  bool mIsFromNsIFile;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_MultipartBlobImpl_h
--- a/dom/file/MutableBlobStorage.cpp
+++ b/dom/file/MutableBlobStorage.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "EmptyBlobImpl.h"
 #include "MutableBlobStorage.h"
 #include "MemoryBlobImpl.h"
 #include "mozilla/CheckedInt.h"
-#include "mozilla/dom/TemporaryIPCBlobChild.h"
+#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/PBackgroundChild.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/TaskQueue.h"
 #include "File.h"
 #include "nsAnonymousTemporaryFile.h"
 #include "nsNetCID.h"
--- a/dom/file/StreamBlobImpl.h
+++ b/dom/file/StreamBlobImpl.h
@@ -41,17 +41,18 @@ class StreamBlobImpl final : public Base
   virtual bool IsMemoryFile() const override { return true; }
 
   int64_t GetFileId() override { return mFileId; }
 
   void SetFileId(int64_t aFileId) { mFileId = aFileId; }
 
   void SetFullPath(const nsAString& aFullPath) { mFullPath = aFullPath; }
 
-  void GetMozFullPathInternal(nsAString& aFullPath, ErrorResult& aRv) override {
+  void GetMozFullPathInternal(nsAString& aFullPath,
+                              ErrorResult& aRv) const override {
     aFullPath = mFullPath;
   }
 
   void SetIsDirectory(bool aIsDirectory) { mIsDirectory = aIsDirectory; }
 
   bool IsDirectory() const override { return mIsDirectory; }
 
   size_t GetAllocationSize() const override;
deleted file mode 100644
--- a/dom/file/ipc/FileCreatorChild.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "FileCreatorChild.h"
-#include "mozilla/dom/Promise.h"
-#include "mozilla/dom/IPCBlobUtils.h"
-
-namespace mozilla {
-namespace dom {
-
-FileCreatorChild::FileCreatorChild() = default;
-
-FileCreatorChild::~FileCreatorChild() { MOZ_ASSERT(!mPromise); }
-
-void FileCreatorChild::SetPromise(Promise* aPromise) {
-  MOZ_ASSERT(aPromise);
-  MOZ_ASSERT(!mPromise);
-
-  mPromise = aPromise;
-}
-
-mozilla::ipc::IPCResult FileCreatorChild::Recv__delete__(
-    const FileCreationResult& aResult) {
-  MOZ_ASSERT(mPromise);
-
-  RefPtr<Promise> promise;
-  promise.swap(mPromise);
-
-  if (aResult.type() == FileCreationResult::TFileCreationErrorResult) {
-    promise->MaybeReject(aResult.get_FileCreationErrorResult().errorCode());
-    return IPC_OK();
-  }
-
-  MOZ_ASSERT(aResult.type() == FileCreationResult::TFileCreationSuccessResult);
-
-  RefPtr<dom::BlobImpl> impl = dom::IPCBlobUtils::Deserialize(
-      aResult.get_FileCreationSuccessResult().blob());
-
-  RefPtr<File> file = File::Create(promise->GetParentObject(), impl);
-  promise->MaybeResolve(file);
-  return IPC_OK();
-}
-
-void FileCreatorChild::ActorDestroy(ActorDestroyReason aWhy) {
-  if (mPromise) {
-    mPromise->MaybeReject(NS_ERROR_FAILURE);
-    mPromise = nullptr;
-  }
-};
-
-}  // namespace dom
-}  // namespace mozilla
deleted file mode 100644
--- a/dom/file/ipc/FileCreatorChild.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_FileCreatorChild_h
-#define mozilla_dom_FileCreatorChild_h
-
-#include "mozilla/dom/PFileCreatorChild.h"
-
-namespace mozilla {
-namespace dom {
-
-class FileCreatorChild final : public mozilla::dom::PFileCreatorChild {
-  friend class mozilla::dom::PFileCreatorChild;
-
- public:
-  FileCreatorChild();
-  ~FileCreatorChild();
-
-  void SetPromise(Promise* aPromise);
-
- private:
-  mozilla::ipc::IPCResult Recv__delete__(
-      const FileCreationResult& aResult) override;
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-
-  RefPtr<Promise> mPromise;
-};
-
-}  // namespace dom
-}  // namespace mozilla
-
-#endif  // mozilla_dom_FileCreatorChild_h
deleted file mode 100644
--- a/dom/file/ipc/FileCreatorParent.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "FileCreatorParent.h"
-#include "mozilla/dom/FileBlobImpl.h"
-#include "mozilla/dom/IPCBlobUtils.h"
-#include "mozilla/dom/MultipartBlobImpl.h"
-
-namespace mozilla {
-namespace dom {
-
-FileCreatorParent::FileCreatorParent()
-    : mBackgroundEventTarget(GetCurrentThreadEventTarget()), mIPCActive(true) {}
-
-FileCreatorParent::~FileCreatorParent() = default;
-
-mozilla::ipc::IPCResult FileCreatorParent::CreateAndShareFile(
-    const nsString& aFullPath, const nsString& aType, const nsString& aName,
-    const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-    const bool& aIsFromNsIFile) {
-  RefPtr<dom::BlobImpl> blobImpl;
-  nsresult rv =
-      CreateBlobImpl(aFullPath, aType, aName, aLastModified.isSome(),
-                     aLastModified.isSome() ? aLastModified.value() : 0,
-                     aExistenceCheck, aIsFromNsIFile, getter_AddRefs(blobImpl));
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    Unused << Send__delete__(this, FileCreationErrorResult(rv));
-    return IPC_OK();
-  }
-
-  MOZ_ASSERT(blobImpl);
-
-  // FileBlobImpl is unable to return the correct type on this thread because
-  // nsIMIMEService is not thread-safe. We must exec the 'type' getter on
-  // main-thread before send the blob to the child actor.
-
-  RefPtr<FileCreatorParent> self = this;
-  NS_DispatchToMainThread(NS_NewRunnableFunction(
-      "FileCreatorParent::CreateAndShareFile", [self, blobImpl]() {
-        nsAutoString type;
-        blobImpl->GetType(type);
-
-        self->mBackgroundEventTarget->Dispatch(NS_NewRunnableFunction(
-            "FileCreatorParent::CreateAndShareFile return", [self, blobImpl]() {
-              if (self->mIPCActive) {
-                IPCBlob ipcBlob;
-                nsresult rv = dom::IPCBlobUtils::Serialize(
-                    blobImpl, self->Manager(), ipcBlob);
-                if (NS_WARN_IF(NS_FAILED(rv))) {
-                  Unused << Send__delete__(self, FileCreationErrorResult(rv));
-                  return;
-                }
-
-                Unused << Send__delete__(self,
-                                         FileCreationSuccessResult(ipcBlob));
-              }
-            }));
-      }));
-
-  return IPC_OK();
-}
-
-void FileCreatorParent::ActorDestroy(ActorDestroyReason aWhy) {
-  mIPCActive = false;
-}
-
-/* static */
-nsresult FileCreatorParent::CreateBlobImpl(
-    const nsAString& aPath, const nsAString& aType, const nsAString& aName,
-    bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
-    bool aIsFromNsIFile, BlobImpl** aBlobImpl) {
-  MOZ_ASSERT(!NS_IsMainThread());
-
-  nsCOMPtr<nsIFile> file;
-  nsresult rv = NS_NewLocalFile(aPath, true, getter_AddRefs(file));
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    return rv;
-  }
-
-  if (aExistenceCheck) {
-    bool exists;
-    nsresult rv = file->Exists(&exists);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      return rv;
-    }
-
-    if (!exists) {
-      return NS_ERROR_FILE_NOT_FOUND;
-    }
-
-    bool isDir;
-    rv = file->IsDirectory(&isDir);
-    if (NS_WARN_IF(NS_FAILED(rv))) {
-      return rv;
-    }
-
-    if (isDir) {
-      return NS_ERROR_FILE_IS_DIRECTORY;
-    }
-  }
-
-  RefPtr<FileBlobImpl> impl = new FileBlobImpl(file);
-
-  // If the file doesn't exist, we cannot have its path, its size and so on.
-  // Let's set them now.
-  if (!aExistenceCheck) {
-    impl->SetMozFullPath(aPath);
-    impl->SetLastModified(0);
-    impl->SetEmptySize();
-  }
-
-  if (!aName.IsEmpty()) {
-    impl->SetName(aName);
-  }
-
-  if (!aType.IsEmpty()) {
-    impl->SetType(aType);
-  }
-
-  if (aLastModifiedPassed) {
-    impl->SetLastModified(aLastModified);
-  }
-
-  if (!aIsFromNsIFile) {
-    impl->SetMozFullPath(EmptyString());
-  }
-
-  impl.forget(aBlobImpl);
-  return NS_OK;
-}
-
-}  // namespace dom
-}  // namespace mozilla
deleted file mode 100644
--- a/dom/file/ipc/FileCreatorParent.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_FileCreatorParent_h
-#define mozilla_dom_FileCreatorParent_h
-
-#include "mozilla/dom/PFileCreatorParent.h"
-
-class nsIFile;
-
-namespace mozilla {
-namespace dom {
-
-class BlobImpl;
-
-class FileCreatorParent final : public mozilla::dom::PFileCreatorParent {
- public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileCreatorParent)
-
-  FileCreatorParent();
-
-  mozilla::ipc::IPCResult CreateAndShareFile(
-      const nsString& aFullPath, const nsString& aType, const nsString& aName,
-      const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-      const bool& aIsFromNsIFile);
-
- private:
-  ~FileCreatorParent();
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-
-  nsresult CreateBlobImpl(const nsAString& aPath, const nsAString& aType,
-                          const nsAString& aName, bool aLastModifiedPassed,
-                          int64_t aLastModified, bool aExistenceCheck,
-                          bool aIsFromNsIFile, BlobImpl** aBlobImpl);
-
-  nsCOMPtr<nsIEventTarget> mBackgroundEventTarget;
-  bool mIPCActive;
-};
-
-}  // namespace dom
-}  // namespace mozilla
-
-#endif  // mozilla_dom_FileCreatorParent_h
--- a/dom/file/ipc/IPCBlobInputStream.h
+++ b/dom/file/ipc/IPCBlobInputStream.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_IPCBlobInputStream_h
-#define mozilla_dom_IPCBlobInputStream_h
+#ifndef mozilla_dom_ipc_IPCBlobInputStream_h
+#define mozilla_dom_ipc_IPCBlobInputStream_h
 
 #include "mozilla/Mutex.h"
 #include "nsIAsyncInputStream.h"
 #include "nsICloneableInputStream.h"
 #include "nsIFileStreams.h"
 #include "nsIIPCSerializableInputStream.h"
 #include "nsIInputStreamLength.h"
 #include "nsCOMPtr.h"
@@ -134,9 +134,9 @@ class IPCBlobInputStream final : public 
   // Any member of this class is protected by mutex because touched on
   // multiple threads.
   Mutex mMutex;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_IPCBlobInputStream_h
+#endif  // mozilla_dom_ipc_IPCBlobInputStream_h
--- a/dom/file/ipc/IPCBlobInputStreamChild.h
+++ b/dom/file/ipc/IPCBlobInputStreamChild.h
@@ -1,30 +1,31 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_IPCBlobInputStreamChild_h
-#define mozilla_dom_IPCBlobInputStreamChild_h
+#ifndef mozilla_dom_ipc_IPCBlobInputStreamChild_h
+#define mozilla_dom_ipc_IPCBlobInputStreamChild_h
 
-#include "mozilla/dom/PIPCBlobInputStreamChild.h"
+#include "mozilla/ipc/PIPCBlobInputStreamChild.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/UniquePtr.h"
 #include "nsIThread.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace dom {
 
 class IPCBlobInputStream;
 class ThreadSafeWorkerRef;
 
-class IPCBlobInputStreamChild final : public PIPCBlobInputStreamChild {
+class IPCBlobInputStreamChild final
+    : public mozilla::ipc::PIPCBlobInputStreamChild {
  public:
   enum ActorState {
     // The actor is connected via IPDL to the parent.
     eActive,
 
     // The actor is disconnected.
     eInactive,
 
@@ -95,9 +96,9 @@ class IPCBlobInputStreamChild final : pu
   nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
 
   RefPtr<ThreadSafeWorkerRef> mWorkerRef;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_IPCBlobInputStreamChild_h
+#endif  // mozilla_dom_ipc_IPCBlobInputStreamChild_h
--- a/dom/file/ipc/IPCBlobInputStreamParent.h
+++ b/dom/file/ipc/IPCBlobInputStreamParent.h
@@ -1,35 +1,36 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_IPCBlobInputStreamParent_h
-#define mozilla_dom_IPCBlobInputStreamParent_h
+#ifndef mozilla_dom_ipc_IPCBlobInputStreamParent_h
+#define mozilla_dom_ipc_IPCBlobInputStreamParent_h
 
-#include "mozilla/dom/PIPCBlobInputStreamParent.h"
+#include "mozilla/ipc/PIPCBlobInputStreamParent.h"
 
 class nsIInputStream;
 
 namespace mozilla {
 namespace dom {
 
 class NS_NO_VTABLE IPCBlobInputStreamParentCallback {
  public:
   virtual void ActorDestroyed(const nsID& aID) = 0;
 
   NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
 
  protected:
   virtual ~IPCBlobInputStreamParentCallback() {}
 };
 
-class IPCBlobInputStreamParent final : public PIPCBlobInputStreamParent {
+class IPCBlobInputStreamParent final
+    : public mozilla::ipc::PIPCBlobInputStreamParent {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(IPCBlobInputStreamParent)
 
   // The size of the inputStream must be passed as argument in order to avoid
   // the use of nsIInputStream::Available() which could open a fileDescriptor in
   // case the stream is a nsFileStream.
   template <typename M>
   static already_AddRefed<IPCBlobInputStreamParent> Create(
@@ -78,9 +79,9 @@ class IPCBlobInputStreamParent final : p
   RefPtr<IPCBlobInputStreamParentCallback> mCallback;
 
   bool mMigrating;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_IPCBlobInputStreamParent_h
+#endif  // mozilla_dom_ipc_IPCBlobInputStreamParent_h
--- a/dom/file/ipc/IPCBlobInputStreamStorage.h
+++ b/dom/file/ipc/IPCBlobInputStreamStorage.h
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_IPCBlobInputStreamStorage_h
-#define mozilla_dom_IPCBlobInputStreamStorage_h
+#ifndef mozilla_dom_ipc_IPCBlobInputStreamStorage_h
+#define mozilla_dom_ipc_IPCBlobInputStreamStorage_h
 
 #include "mozilla/RefPtr.h"
 #include "nsClassHashtable.h"
 #include "nsIObserver.h"
 
 class nsIInputStream;
 struct nsID;
 
@@ -59,9 +59,9 @@ class IPCBlobInputStreamStorage final : 
   };
 
   nsClassHashtable<nsIDHashKey, StreamData> mStorage;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_IPCBlobInputStreamStorage_h
+#endif  // mozilla_dom_ipc_IPCBlobInputStreamStorage_h
deleted file mode 100644
--- a/dom/file/ipc/PFileCreator.ipdl
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-include protocol PBackground;
-include protocol PChildToParentStream;
-include protocol PFileDescriptorSet;
-include protocol PIPCBlobInputStream;
-include protocol PParentToChildStream;
-
-include IPCBlob;
-
-namespace mozilla {
-namespace dom {
-
-struct FileCreationSuccessResult
-{
-  IPCBlob blob;
-};
-
-struct FileCreationErrorResult
-{
-  nsresult errorCode;
-};
-
-union FileCreationResult
-{
-  FileCreationSuccessResult;
-  FileCreationErrorResult;
-};
-
-protocol PFileCreator
-{
-  manager PBackground;
-
-child:
-  async __delete__(FileCreationResult aResult);
-};
-
-} // namespace dom 
-} // namespace mozilla
--- a/dom/file/ipc/PIPCBlobInputStream.ipdl
+++ b/dom/file/ipc/PIPCBlobInputStream.ipdl
@@ -6,17 +6,17 @@ include protocol PBackground;
 include protocol PChildToParentStream;
 include protocol PContent;
 include protocol PFileDescriptorSet;
 include protocol PParentToChildStream;
 
 include IPCStream;
 
 namespace mozilla {
-namespace dom {
+namespace ipc {
 
 protocol PIPCBlobInputStream
 {
   manager PBackground or PContent;
 
 parent:
   async StreamNeeded();
 
--- a/dom/file/ipc/PPendingIPCBlob.ipdl
+++ b/dom/file/ipc/PPendingIPCBlob.ipdl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 include protocol PBackground;
 
 include IPCBlob;
 
 namespace mozilla {
-namespace dom {
+namespace ipc {
 
 // IndexedDB and FileHandle do not know all the Blob/File properties when they
 // create a IPCBlob. For this reason, they need to use this simple protocol.
 // When the information is known, they send a __delete__ message with the
 // pending data.
 
 // This contains any extra bit for making a File out of a Blob.
 struct PendingIPCFileData
--- a/dom/file/ipc/PTemporaryIPCBlob.ipdl
+++ b/dom/file/ipc/PTemporaryIPCBlob.ipdl
@@ -6,17 +6,17 @@ include protocol PBackground;
 include protocol PChildToParentStream;
 include protocol PFileDescriptorSet;
 include protocol PIPCBlobInputStream;
 include protocol PParentToChildStream;
 
 include IPCBlob;
 
 namespace mozilla {
-namespace dom {
+namespace ipc {
 
 union IPCBlobOrError
 {
   IPCBlob;
   nsresult;
 };
 
 protocol PTemporaryIPCBlob
@@ -34,10 +34,10 @@ child:
   async __delete__(IPCBlobOrError aBlobOrError);
 
 parent:
   async OperationFailed();
 
   async OperationDone(nsCString aContentType, FileDescriptor aFD);
 };
 
-} // namespace dom 
+} // namespace dom
 } // namespace mozilla
--- a/dom/file/ipc/PendingIPCBlobChild.h
+++ b/dom/file/ipc/PendingIPCBlobChild.h
@@ -1,26 +1,26 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_PendingIPCBlobChild_h
-#define mozilla_dom_PendingIPCBlobChild_h
+#ifndef mozilla_dom_ipc_PendingIPCBlobChild_h
+#define mozilla_dom_ipc_PendingIPCBlobChild_h
 
-#include "mozilla/dom/PPendingIPCBlob.h"
-#include "mozilla/dom/PPendingIPCBlobChild.h"
+#include "mozilla/ipc/PPendingIPCBlob.h"
+#include "mozilla/ipc/PPendingIPCBlobChild.h"
 
 namespace mozilla {
 namespace dom {
 
 class BlobImpl;
 
-class PendingIPCBlobChild final : public PPendingIPCBlobChild {
+class PendingIPCBlobChild final : public mozilla::ipc::PPendingIPCBlobChild {
  public:
   explicit PendingIPCBlobChild(const IPCBlob& aBlob);
 
   // After calling one of the following method, the actor will be deleted.
 
   // For File.
   already_AddRefed<BlobImpl> SetPendingInfoAndDeleteActor(
       const nsString& aName, const nsString& aContentType, uint64_t aLength,
@@ -34,9 +34,9 @@ class PendingIPCBlobChild final : public
   ~PendingIPCBlobChild();
 
   RefPtr<BlobImpl> mBlobImpl;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_PendingIPCBlobChild_h
+#endif  // mozilla_dom_ipc_PendingIPCBlobChild_h
--- a/dom/file/ipc/PendingIPCBlobParent.h
+++ b/dom/file/ipc/PendingIPCBlobParent.h
@@ -1,30 +1,30 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_PendingIPCBlobParent_h
-#define mozilla_dom_PendingIPCBlobParent_h
+#ifndef mozilla_dom_ipc_PendingIPCBlobParent_h
+#define mozilla_dom_ipc_PendingIPCBlobParent_h
 
-#include "mozilla/dom/PPendingIPCBlobParent.h"
+#include "mozilla/ipc/PPendingIPCBlobParent.h"
 
 namespace mozilla {
 
 namespace ipc {
 class PBackgroundParent;
 }
 
 namespace dom {
 
 class BlobImpl;
 
-class PendingIPCBlobParent final : public PPendingIPCBlobParent {
+class PendingIPCBlobParent final : public mozilla::ipc::PPendingIPCBlobParent {
  public:
   static PendingIPCBlobParent* Create(PBackgroundParent* aManager,
                                       BlobImpl* aBlobImpl);
 
   void ActorDestroy(ActorDestroyReason aWhy) override {}
 
   mozilla::ipc::IPCResult Recv__delete__(
       const PendingIPCBlobData& aData) override;
@@ -33,9 +33,9 @@ class PendingIPCBlobParent final : publi
   explicit PendingIPCBlobParent(BlobImpl* aBlobImpl);
 
   RefPtr<BlobImpl> mBlobImpl;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_PendingIPCBlobParent_h
+#endif  // mozilla_dom_ipc_PendingIPCBlobParent_h
--- a/dom/file/ipc/TemporaryIPCBlobChild.h
+++ b/dom/file/ipc/TemporaryIPCBlobChild.h
@@ -1,35 +1,36 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_TemporaryIPCBlobChild_h
-#define mozilla_dom_TemporaryIPCBlobChild_h
+#ifndef mozilla_dom_ipc_TemporaryIPCBlobChild_h
+#define mozilla_dom_ipc_TemporaryIPCBlobChild_h
 
-#include "mozilla/dom/PTemporaryIPCBlob.h"
-#include "mozilla/dom/PTemporaryIPCBlobChild.h"
+#include "mozilla/ipc/PTemporaryIPCBlob.h"
+#include "mozilla/ipc/PTemporaryIPCBlobChild.h"
 
 namespace mozilla {
 namespace dom {
 
 class MutableBlobStorage;
 
 class TemporaryIPCBlobChildCallback {
  public:
   NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
 
   virtual void OperationSucceeded(BlobImpl* aBlobImpl) = 0;
   virtual void OperationFailed(nsresult aRv) = 0;
 };
 
-class TemporaryIPCBlobChild final : public PTemporaryIPCBlobChild {
-  friend class PTemporaryIPCBlobChild;
+class TemporaryIPCBlobChild final
+    : public mozilla::ipc::PTemporaryIPCBlobChild {
+  friend class mozilla::ipc::PTemporaryIPCBlobChild;
 
  public:
   NS_INLINE_DECL_REFCOUNTING(TemporaryIPCBlobChild)
 
   explicit TemporaryIPCBlobChild(MutableBlobStorage* aMutableBlobStorage);
 
   void AskForBlob(TemporaryIPCBlobChildCallback* aCallback,
                   const nsACString& aContentType, PRFileDesc* aFD);
@@ -47,9 +48,9 @@ class TemporaryIPCBlobChild final : publ
   RefPtr<MutableBlobStorage> mMutableBlobStorage;
   RefPtr<TemporaryIPCBlobChildCallback> mCallback;
   bool mActive;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_TemporaryIPCBlobChild_h
+#endif  // mozilla_dom_ipc_TemporaryIPCBlobChild_h
--- a/dom/file/ipc/TemporaryIPCBlobParent.h
+++ b/dom/file/ipc/TemporaryIPCBlobParent.h
@@ -1,27 +1,28 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_TemporaryIPCBlobParent_h
-#define mozilla_dom_TemporaryIPCBlobParent_h
+#ifndef mozilla_dom_ipc_TemporaryIPCBlobParent_h
+#define mozilla_dom_ipc_TemporaryIPCBlobParent_h
 
-#include "mozilla/dom/PTemporaryIPCBlob.h"
-#include "mozilla/dom/PTemporaryIPCBlobParent.h"
+#include "mozilla/ipc/PTemporaryIPCBlob.h"
+#include "mozilla/ipc/PTemporaryIPCBlobParent.h"
 
 class nsIFile;
 
 namespace mozilla {
 namespace dom {
 
-class TemporaryIPCBlobParent final : public PTemporaryIPCBlobParent {
-  friend class PTemporaryIPCBlobParent;
+class TemporaryIPCBlobParent final
+    : public mozilla::ipc::PTemporaryIPCBlobParent {
+  friend class mozilla::ipc::PTemporaryIPCBlobParent;
 
  public:
   explicit TemporaryIPCBlobParent();
 
   mozilla::ipc::IPCResult CreateAndShareFile();
 
  private:
   ~TemporaryIPCBlobParent();
@@ -37,9 +38,9 @@ class TemporaryIPCBlobParent final : pub
 
   nsCOMPtr<nsIFile> mFile;
   bool mActive;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
-#endif  // mozilla_dom_TemporaryIPCBlobParent_h
+#endif  // mozilla_dom_ipc_TemporaryIPCBlobParent_h
--- a/dom/file/ipc/moz.build
+++ b/dom/file/ipc/moz.build
@@ -2,52 +2,47 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: File")
 
-EXPORTS.mozilla.dom += [
-    'FileCreatorChild.h',
-    'FileCreatorParent.h',
+EXPORTS.mozilla.dom.ipc += [
     'IPCBlobInputStream.h',
     'IPCBlobInputStreamChild.h',
     'IPCBlobInputStreamParent.h',
     'IPCBlobInputStreamStorage.h',
     'PendingIPCBlobChild.h',
     'PendingIPCBlobParent.h',
     'TemporaryIPCBlobChild.h',
     'TemporaryIPCBlobParent.h',
 ]
 
 EXPORTS.mozilla.dom += [
     'IPCBlobUtils.h',
 ]
 
 UNIFIED_SOURCES += [
-    'FileCreatorChild.cpp',
-    'FileCreatorParent.cpp',
     'IPCBlobInputStream.cpp',
     'IPCBlobInputStreamChild.cpp',
     'IPCBlobInputStreamParent.cpp',
     'IPCBlobInputStreamStorage.cpp',
     'IPCBlobInputStreamThread.cpp',
     'IPCBlobUtils.cpp',
     'PendingIPCBlobChild.cpp',
     'PendingIPCBlobParent.cpp',
     'TemporaryIPCBlobChild.cpp',
     'TemporaryIPCBlobParent.cpp',
 ]
 
 IPDL_SOURCES += [
     'BlobTypes.ipdlh',
     'IPCBlob.ipdlh',
-    'PFileCreator.ipdl',
     'PIPCBlobInputStream.ipdl',
     'PPendingIPCBlob.ipdl',
     'PTemporaryIPCBlob.ipdl',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/file',
     '/dom/ipc',
--- a/dom/filehandle/ActorsParent.cpp
+++ b/dom/filehandle/ActorsParent.cpp
@@ -11,17 +11,17 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/Unused.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/PBackgroundFileHandleParent.h"
 #include "mozilla/dom/PBackgroundFileRequestParent.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseParent.h"
 #include "mozilla/dom/IPCBlobUtils.h"
-#include "mozilla/dom/PendingIPCBlobParent.h"
+#include "mozilla/dom/ipc/PendingIPCBlobParent.h"
 #include "mozilla/dom/quota/MemoryOutputStream.h"
 #include "nsAutoPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsDebug.h"
 #include "nsError.h"
 #include "nsIEventTarget.h"
 #include "nsIFileStreams.h"
 #include "nsIInputStream.h"
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -23,18 +23,18 @@
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/TypeTraits.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/PermissionMessageUtils.h"
 #include "mozilla/dom/BrowserChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileChild.h"
+#include "mozilla/dom/ipc/PendingIPCBlobChild.h"
 #include "mozilla/dom/IPCBlobUtils.h"
-#include "mozilla/dom/PendingIPCBlobChild.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerRunnable.h"
 #include "mozilla/Encoding.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/TaskQueue.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nsIAsyncInputStream.h"
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -47,18 +47,18 @@
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseFileParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBDatabaseRequestParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryRequestParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBRequestParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBTransactionParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBVersionChangeTransactionParent.h"
 #include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsParent.h"
-#include "mozilla/dom/IPCBlobInputStreamParent.h"
 #include "mozilla/dom/IPCBlobUtils.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
 #include "mozilla/dom/quota/CheckedUnsafePtr.h"
 #include "mozilla/dom/quota/Client.h"
 #include "mozilla/dom/quota/FileStreams.h"
 #include "mozilla/dom/quota/OriginScope.h"
 #include "mozilla/dom/quota/QuotaCommon.h"
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/dom/quota/UsageInfo.h"
 #include "mozilla/ipc/BackgroundParent.h"
--- a/dom/indexedDB/FileSnapshot.h
+++ b/dom/indexedDB/FileSnapshot.h
@@ -67,22 +67,22 @@ class BlobImplSnapshot final : public Bl
   }
 
   virtual void SetLastModified(int64_t aLastModified) override {
     mBlobImpl->SetLastModified(aLastModified);
   }
 
   virtual void GetMozFullPath(nsAString& aName,
                               SystemCallerGuarantee aGuarantee,
-                              ErrorResult& aRv) override {
+                              ErrorResult& aRv) const override {
     mBlobImpl->GetMozFullPath(aName, aGuarantee, aRv);
   }
 
   virtual void GetMozFullPathInternal(nsAString& aFileName,
-                                      ErrorResult& aRv) override {
+                                      ErrorResult& aRv) const override {
     mBlobImpl->GetMozFullPathInternal(aFileName, aRv);
   }
 
   virtual uint64_t GetSize(ErrorResult& aRv) override {
     return mBlobImpl->GetSize(aRv);
   }
 
   virtual void GetType(nsAString& aType) override { mBlobImpl->GetType(aType); }
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -34,32 +34,33 @@
 #include "mozilla/dom/ClientOpenWindowOpActors.h"
 #include "mozilla/dom/ChildProcessMessageManager.h"
 #include "mozilla/dom/ContentProcessMessageManager.h"
 #include "mozilla/dom/DOMPrefs.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/DocGroup.h"
 #include "mozilla/dom/ExternalHelperAppChild.h"
+#include "mozilla/dom/FileCreatorHelper.h"
 #include "mozilla/dom/GetFilesHelper.h"
-#include "mozilla/dom/IPCBlobInputStreamChild.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/JSWindowActorService.h"
 #include "mozilla/dom/LSObject.h"
 #include "mozilla/dom/MemoryReportRequest.h"
 #include "mozilla/dom/PLoginReputationChild.h"
 #include "mozilla/dom/PSessionStorageObserverChild.h"
 #include "mozilla/dom/PostMessageEvent.h"
 #include "mozilla/dom/PushNotifier.h"
 #include "mozilla/dom/RemoteWorkerService.h"
 #include "mozilla/dom/ServiceWorkerManager.h"
 #include "mozilla/dom/TabGroup.h"
 #include "mozilla/dom/URLClassifierChild.h"
 #include "mozilla/dom/WorkerDebugger.h"
 #include "mozilla/dom/WorkerDebuggerManager.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
 #include "mozilla/dom/ipc/SharedMap.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/Logging.h"
 #include "mozilla/psm/PSMContentListener.h"
 #include "mozilla/hal_sandbox/PHalChild.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/FileDescriptorSetChild.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
@@ -3382,16 +3383,61 @@ ContentChild::AllocPSessionStorageObserv
 bool ContentChild::DeallocPSessionStorageObserverChild(
     PSessionStorageObserverChild* aActor) {
   MOZ_ASSERT(aActor);
 
   delete aActor;
   return true;
 }
 
+void ContentChild::FileCreationRequest(nsID& aUUID, FileCreatorHelper* aHelper,
+                                       const nsAString& aFullPath,
+                                       const nsAString& aType,
+                                       const nsAString& aName,
+                                       const Optional<int64_t>& aLastModified,
+                                       bool aExistenceCheck,
+                                       bool aIsFromNsIFile) {
+  MOZ_ASSERT(aHelper);
+
+  bool lastModifiedPassed = false;
+  int64_t lastModified = 0;
+  if (aLastModified.WasPassed()) {
+    lastModifiedPassed = true;
+    lastModified = aLastModified.Value();
+  }
+
+  Unused << SendFileCreationRequest(
+      aUUID, nsString(aFullPath), nsString(aType), nsString(aName),
+      lastModifiedPassed, lastModified, aExistenceCheck, aIsFromNsIFile);
+  mFileCreationPending.Put(aUUID, aHelper);
+}
+
+mozilla::ipc::IPCResult ContentChild::RecvFileCreationResponse(
+    const nsID& aUUID, const FileCreationResult& aResult) {
+  FileCreatorHelper* helper = mFileCreationPending.GetWeak(aUUID);
+  if (!helper) {
+    return IPC_FAIL_NO_REASON(this);
+  }
+
+  if (aResult.type() == FileCreationResult::TFileCreationErrorResult) {
+    helper->ResponseReceived(nullptr,
+                             aResult.get_FileCreationErrorResult().errorCode());
+  } else {
+    MOZ_ASSERT(aResult.type() ==
+               FileCreationResult::TFileCreationSuccessResult);
+
+    RefPtr<BlobImpl> impl = IPCBlobUtils::Deserialize(
+        aResult.get_FileCreationSuccessResult().blob());
+    helper->ResponseReceived(impl, NS_OK);
+  }
+
+  mFileCreationPending.Remove(aUUID);
+  return IPC_OK();
+}
+
 mozilla::ipc::IPCResult ContentChild::RecvActivate(PBrowserChild* aTab) {
   BrowserChild* tab = static_cast<BrowserChild*>(aTab);
   return tab->RecvActivate();
 }
 
 mozilla::ipc::IPCResult ContentChild::RecvDeactivate(PBrowserChild* aTab) {
   BrowserChild* tab = static_cast<BrowserChild*>(aTab);
   return tab->RecvDeactivate();
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -72,16 +72,17 @@ namespace ipc {
 class SharedMap;
 }
 
 class AlertObserver;
 class ConsoleListener;
 class ClonedMessageData;
 class BrowserChild;
 class GetFilesHelperChild;
+class FileCreatorHelper;
 
 class ContentChild final : public PContentChild,
                            public nsIWindowProvider,
                            public CPOWManagerGetter,
                            public mozilla::ipc::IShmemAllocator {
   typedef mozilla::dom::ClonedMessageData ClonedMessageData;
   typedef mozilla::ipc::FileDescriptor FileDescriptor;
   typedef mozilla::ipc::PFileDescriptorSetChild PFileDescriptorSetChild;
@@ -558,16 +559,19 @@ class ContentChild final : public PConte
       const nsID& aUUID, const GetFilesResponseResult& aResult);
 
   mozilla::ipc::IPCResult RecvBlobURLRegistration(
       const nsCString& aURI, const IPCBlob& aBlob,
       const IPC::Principal& aPrincipal);
 
   mozilla::ipc::IPCResult RecvBlobURLUnregistration(const nsCString& aURI);
 
+  mozilla::ipc::IPCResult RecvFileCreationResponse(
+      const nsID& aUUID, const FileCreationResult& aResult);
+
   mozilla::ipc::IPCResult RecvRequestMemoryReport(
       const uint32_t& generation, const bool& anonymize,
       const bool& minimizeMemoryUsage, const Maybe<FileDescriptor>& DMDFile);
 
   mozilla::ipc::IPCResult RecvSetXPCOMProcessAttributes(
       const XPCOMInitData& aXPCOMInit, const StructuredCloneData& aInitialData,
       nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache,
       nsTArray<SystemFontListEntry>&& aFontList,
@@ -636,16 +640,23 @@ class ContentChild final : public PConte
    * Helper function for protocols that use the GPU process when available.
    * Overrides FatalError to just be a warning when communicating with the
    * GPU process since we don't want to crash the content process when the
    * GPU process crashes.
    */
   static void FatalErrorIfNotUsingGPUProcess(const char* const aErrorMsg,
                                              base::ProcessId aOtherPid);
 
+  // This method is used by FileCreatorHelper for the creation of a BlobImpl.
+  void FileCreationRequest(nsID& aUUID, FileCreatorHelper* aHelper,
+                           const nsAString& aFullPath, const nsAString& aType,
+                           const nsAString& aName,
+                           const Optional<int64_t>& aLastModified,
+                           bool aExistenceCheck, bool aIsFromNsIFile);
+
   typedef std::function<void(PRFileDesc*)> AnonymousTemporaryFileCallback;
   nsresult AsyncOpenAnonymousTemporaryFile(
       const AnonymousTemporaryFileCallback& aCallback);
 
   already_AddRefed<nsIEventTarget> GetEventTargetFor(
       BrowserChild* aBrowserChild);
 
   mozilla::ipc::IPCResult RecvSetPluginList(
@@ -788,16 +799,20 @@ class ContentChild final : public PConte
   nsCOMPtr<nsIFile> mProfileDir;
 #endif
 
   // Hashtable to keep track of the pending GetFilesHelper objects.
   // This GetFilesHelperChild objects are removed when RecvGetFilesResponse is
   // received.
   nsRefPtrHashtable<nsIDHashKey, GetFilesHelperChild> mGetFilesPendingRequests;
 
+  // Hashtable to keep track of the pending file creation.
+  // These items are removed when RecvFileCreationResponse is received.
+  nsRefPtrHashtable<nsIDHashKey, FileCreatorHelper> mFileCreationPending;
+
   nsClassHashtable<nsUint64HashKey, AnonymousTemporaryFileCallback>
       mPendingAnonymousTemporaryFiles;
 
   mozilla::Atomic<bool> mShuttingDown;
 
 #ifdef NIGHTLY_BUILD
   // NOTE: This member is atomic because it can be accessed from
   // off-main-thread.
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -42,18 +42,18 @@
 #include "mozilla/dom/BrowsingContextGroup.h"
 #include "mozilla/dom/CanonicalBrowsingContext.h"
 #include "mozilla/dom/ClientManager.h"
 #include "mozilla/dom/ClientOpenWindowOpActors.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/File.h"
+#include "mozilla/dom/FileCreatorHelper.h"
 #include "mozilla/dom/FileSystemSecurity.h"
-#include "mozilla/dom/IPCBlobInputStreamParent.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/dom/ExternalHelperAppParent.h"
 #include "mozilla/dom/GetFilesHelper.h"
 #include "mozilla/dom/GeolocationBinding.h"
 #include "mozilla/dom/JSWindowActorService.h"
 #include "mozilla/dom/LocalStorageCommon.h"
 #include "mozilla/dom/MemoryReportRequest.h"
 #include "mozilla/dom/Notification.h"
@@ -64,16 +64,17 @@
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/Permissions.h"
 #include "mozilla/dom/PresentationParent.h"
 #include "mozilla/dom/PPresentationParent.h"
 #include "mozilla/dom/PushNotifier.h"
 #include "mozilla/dom/quota/QuotaManagerService.h"
 #include "mozilla/dom/ServiceWorkerUtils.h"
 #include "mozilla/dom/URLClassifierParent.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
 #include "mozilla/dom/ipc/SharedMap.h"
 #include "mozilla/embedding/printingui/PrintingParent.h"
 #include "mozilla/extensions/StreamFilterParent.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/hal_sandbox/PHalParent.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundParent.h"
@@ -5527,16 +5528,59 @@ mozilla::ipc::IPCResult ContentParent::R
 bool ContentParent::DeallocPSessionStorageObserverParent(
     PSessionStorageObserverParent* aActor) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPSessionStorageObserverParent(aActor);
 }
 
+mozilla::ipc::IPCResult ContentParent::RecvFileCreationRequest(
+    const nsID& aID, const nsString& aFullPath, const nsString& aType,
+    const nsString& aName, const bool& aLastModifiedPassed,
+    const int64_t& aLastModified, const bool& aExistenceCheck,
+    const bool& aIsFromNsIFile) {
+  // We allow the creation of File via this IPC call only for the 'file' process
+  // or for testing.
+  if (!mRemoteType.EqualsLiteral(FILE_REMOTE_TYPE) &&
+      !Preferences::GetBool("dom.file.createInChild", false)) {
+    return IPC_FAIL_NO_REASON(this);
+  }
+
+  RefPtr<BlobImpl> blobImpl;
+  nsresult rv = FileCreatorHelper::CreateBlobImplForIPC(
+      aFullPath, aType, aName, aLastModifiedPassed, aLastModified,
+      aExistenceCheck, aIsFromNsIFile, getter_AddRefs(blobImpl));
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    if (!SendFileCreationResponse(aID, FileCreationErrorResult(rv))) {
+      return IPC_FAIL_NO_REASON(this);
+    }
+
+    return IPC_OK();
+  }
+
+  MOZ_ASSERT(blobImpl);
+
+  IPCBlob ipcBlob;
+  rv = IPCBlobUtils::Serialize(blobImpl, this, ipcBlob);
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    if (!SendFileCreationResponse(aID, FileCreationErrorResult(rv))) {
+      return IPC_FAIL_NO_REASON(this);
+    }
+
+    return IPC_OK();
+  }
+
+  if (!SendFileCreationResponse(aID, FileCreationSuccessResult(ipcBlob))) {
+    return IPC_FAIL_NO_REASON(this);
+  }
+
+  return IPC_OK();
+}
+
 nsresult ContentParent::SaveRecording(nsIFile* aFile, bool* aRetval) {
   if (mRecordReplayState != eRecording) {
     *aRetval = false;
     return NS_OK;
   }
 
   PRFileDesc* prfd;
   nsresult rv = aFile->OpenNSPRFileDesc(
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -1123,16 +1123,22 @@ class ContentParent final : public PCont
       const nsCString& aScope, const IPC::Principal& aPrincipal);
 
   mozilla::ipc::IPCResult RecvGetFilesRequest(const nsID& aID,
                                               const nsString& aDirectoryPath,
                                               const bool& aRecursiveFlag);
 
   mozilla::ipc::IPCResult RecvDeleteGetFilesRequest(const nsID& aID);
 
+  mozilla::ipc::IPCResult RecvFileCreationRequest(
+      const nsID& aID, const nsString& aFullPath, const nsString& aType,
+      const nsString& aName, const bool& aLastModifiedPassed,
+      const int64_t& aLastModified, const bool& aExistenceCheck,
+      const bool& aIsFromNsIFile);
+
   mozilla::ipc::IPCResult RecvAccumulateChildHistograms(
       InfallibleTArray<HistogramAccumulation>&& aAccumulations);
   mozilla::ipc::IPCResult RecvAccumulateChildKeyedHistograms(
       InfallibleTArray<KeyedHistogramAccumulation>&& aAccumulations);
   mozilla::ipc::IPCResult RecvUpdateChildScalars(
       InfallibleTArray<ScalarAction>&& aScalarActions);
   mozilla::ipc::IPCResult RecvUpdateChildKeyedScalars(
       InfallibleTArray<KeyedScalarAction>&& aScalarActions);
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -198,16 +198,32 @@ struct GetFilesResponseFailure
 };
 
 union GetFilesResponseResult
 {
   GetFilesResponseSuccess;
   GetFilesResponseFailure;
 };
 
+struct FileCreationSuccessResult
+{
+  IPCBlob blob;
+};
+
+struct FileCreationErrorResult
+{
+  nsresult errorCode;
+};
+
+union FileCreationResult
+{
+  FileCreationSuccessResult;
+  FileCreationErrorResult;
+};
+
 struct BlobURLRegistrationData
 {
   nsCString url;
   IPCBlob blob;
   Principal principal;
   bool revoked;
 };
 
@@ -649,16 +665,18 @@ child:
     async BlobURLRegistration(nsCString aURI, IPCBlob aBlob,
                               Principal aPrincipal);
 
     async BlobURLUnregistration(nsCString aURI);
 
     async GMPsChanged(GMPCapabilityData[] capabilities);
 
 
+    async FileCreationResponse(nsID aID, FileCreationResult aResult);
+
     /**
      * Sending an activate message moves focus to the child.
      */
     async Activate(PBrowser aTab);
 
     async Deactivate(PBrowser aTab);
 
     async PParentToChildStream();
@@ -1183,16 +1201,21 @@ parent:
      * Notify `push-subscription-change` observers in the parent.
      */
     async NotifyPushSubscriptionChangeObservers(nsCString scope,
                                                 Principal principal);
 
      async GetFilesRequest(nsID aID, nsString aDirectory, bool aRecursiveFlag);
      async DeleteGetFilesRequest(nsID aID);
 
+     async FileCreationRequest(nsID aID, nsString aFullPath, nsString aType,
+                               nsString aName, bool lastModifiedPassed,
+                               int64_t lastModified, bool aExistenceCheck,
+                               bool aIsFromNsIFile);
+
      async StoreAndBroadcastBlobURLRegistration(nsCString url, IPCBlob blob,
                                                 Principal principal);
 
      async UnstoreAndBroadcastBlobURLUnregistration(nsCString url);
 
     /**
      * Messages for communicating child Telemetry to the parent process
      */
--- a/ipc/glue/BackgroundChildImpl.cpp
+++ b/ipc/glue/BackgroundChildImpl.cpp
@@ -11,32 +11,30 @@
 #include "FileDescriptorSetChild.h"
 #ifdef MOZ_WEBRTC
 #  include "CamerasChild.h"
 #endif
 #include "mozilla/media/MediaChild.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/SchedulerGroup.h"
 #include "mozilla/dom/ClientManagerActors.h"
-#include "mozilla/dom/FileCreatorChild.h"
 #include "mozilla/dom/PBackgroundLSDatabaseChild.h"
 #include "mozilla/dom/PBackgroundLSObserverChild.h"
 #include "mozilla/dom/PBackgroundLSRequestChild.h"
 #include "mozilla/dom/PBackgroundLSSimpleRequestChild.h"
 #include "mozilla/dom/PBackgroundSDBConnectionChild.h"
 #include "mozilla/dom/PFileSystemRequestChild.h"
 #include "mozilla/dom/EndpointForReportChild.h"
 #include "mozilla/dom/FileSystemTaskBase.h"
-#include "mozilla/dom/IPCBlobInputStreamChild.h"
-#include "mozilla/dom/PendingIPCBlobChild.h"
-#include "mozilla/dom/TemporaryIPCBlobChild.h"
 #include "mozilla/dom/cache/ActorUtils.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
 #include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
-#include "mozilla/dom/IPCBlobUtils.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
+#include "mozilla/dom/ipc/PendingIPCBlobChild.h"
+#include "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
 #include "mozilla/dom/quota/PQuotaChild.h"
 #include "mozilla/dom/RemoteWorkerChild.h"
 #include "mozilla/dom/RemoteWorkerServiceChild.h"
 #include "mozilla/dom/SharedWorkerChild.h"
 #include "mozilla/dom/StorageIPC.h"
 #include "mozilla/dom/GamepadEventChannelChild.h"
 #include "mozilla/dom/GamepadTestChannelChild.h"
 #include "mozilla/dom/LocalStorage.h"
@@ -305,23 +303,23 @@ bool BackgroundChildImpl::DeallocPBackgr
     PBackgroundStorageChild* aActor) {
   MOZ_ASSERT(aActor);
 
   StorageDBChild* child = static_cast<StorageDBChild*>(aActor);
   child->ReleaseIPDLReference();
   return true;
 }
 
-dom::PPendingIPCBlobChild* BackgroundChildImpl::AllocPPendingIPCBlobChild(
+PPendingIPCBlobChild* BackgroundChildImpl::AllocPPendingIPCBlobChild(
     const IPCBlob& aBlob) {
-  return new dom::PendingIPCBlobChild(aBlob);
+  return new mozilla::dom::PendingIPCBlobChild(aBlob);
 }
 
 bool BackgroundChildImpl::DeallocPPendingIPCBlobChild(
-    dom::PPendingIPCBlobChild* aActor) {
+    PPendingIPCBlobChild* aActor) {
   delete aActor;
   return true;
 }
 
 dom::PRemoteWorkerChild* BackgroundChildImpl::AllocPRemoteWorkerChild(
     const RemoteWorkerData& aData) {
   RefPtr<dom::RemoteWorkerChild> agent = new dom::RemoteWorkerChild();
   return agent.forget().take();
@@ -364,56 +362,42 @@ dom::PSharedWorkerChild* BackgroundChild
 
 bool BackgroundChildImpl::DeallocPSharedWorkerChild(
     dom::PSharedWorkerChild* aActor) {
   RefPtr<dom::SharedWorkerChild> actor =
       dont_AddRef(static_cast<dom::SharedWorkerChild*>(aActor));
   return true;
 }
 
-dom::PTemporaryIPCBlobChild*
-BackgroundChildImpl::AllocPTemporaryIPCBlobChild() {
+PTemporaryIPCBlobChild* BackgroundChildImpl::AllocPTemporaryIPCBlobChild() {
   MOZ_CRASH("This is not supposed to be called.");
   return nullptr;
 }
 
 bool BackgroundChildImpl::DeallocPTemporaryIPCBlobChild(
-    dom::PTemporaryIPCBlobChild* aActor) {
-  RefPtr<dom::TemporaryIPCBlobChild> actor =
-      dont_AddRef(static_cast<dom::TemporaryIPCBlobChild*>(aActor));
+    PTemporaryIPCBlobChild* aActor) {
+  RefPtr<mozilla::dom::TemporaryIPCBlobChild> actor =
+      dont_AddRef(static_cast<mozilla::dom::TemporaryIPCBlobChild*>(aActor));
   return true;
 }
 
-dom::PFileCreatorChild* BackgroundChildImpl::AllocPFileCreatorChild(
-    const nsString& aFullPath, const nsString& aType, const nsString& aName,
-    const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-    const bool& aIsFromNsIFile) {
-  return new dom::FileCreatorChild();
-}
-
-bool BackgroundChildImpl::DeallocPFileCreatorChild(PFileCreatorChild* aActor) {
-  delete static_cast<dom::FileCreatorChild*>(aActor);
-  return true;
-}
-
-dom::PIPCBlobInputStreamChild*
-BackgroundChildImpl::AllocPIPCBlobInputStreamChild(const nsID& aID,
-                                                   const uint64_t& aSize) {
+PIPCBlobInputStreamChild* BackgroundChildImpl::AllocPIPCBlobInputStreamChild(
+    const nsID& aID, const uint64_t& aSize) {
   // IPCBlobInputStreamChild is refcounted. Here it's created and in
   // DeallocPIPCBlobInputStreamChild is released.
 
-  RefPtr<dom::IPCBlobInputStreamChild> actor =
-      new dom::IPCBlobInputStreamChild(aID, aSize);
+  RefPtr<mozilla::dom::IPCBlobInputStreamChild> actor =
+      new mozilla::dom::IPCBlobInputStreamChild(aID, aSize);
   return actor.forget().take();
 }
 
 bool BackgroundChildImpl::DeallocPIPCBlobInputStreamChild(
-    dom::PIPCBlobInputStreamChild* aActor) {
-  RefPtr<dom::IPCBlobInputStreamChild> actor =
-      dont_AddRef(static_cast<dom::IPCBlobInputStreamChild*>(aActor));
+    PIPCBlobInputStreamChild* aActor) {
+  RefPtr<mozilla::dom::IPCBlobInputStreamChild> actor =
+      dont_AddRef(static_cast<mozilla::dom::IPCBlobInputStreamChild*>(aActor));
   return true;
 }
 
 PFileDescriptorSetChild* BackgroundChildImpl::AllocPFileDescriptorSetChild(
     const FileDescriptor& aFileDescriptor) {
   return new FileDescriptorSetChild(aFileDescriptor);
 }
 
--- a/ipc/glue/BackgroundChildImpl.h
+++ b/ipc/glue/BackgroundChildImpl.h
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_ipc_backgroundchildimpl_h__
 #define mozilla_ipc_backgroundchildimpl_h__
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ipc/PBackgroundChild.h"
-#include "nsRefPtrHashtable.h"
 #include "nsAutoPtr.h"
 
 namespace mozilla {
 namespace dom {
 
 class IDBFileHandle;
 
 namespace indexedDB {
@@ -122,23 +121,16 @@ class BackgroundChildImpl : public PBack
   virtual bool DeallocPIPCBlobInputStreamChild(
       PIPCBlobInputStreamChild* aActor) override;
 
   virtual PTemporaryIPCBlobChild* AllocPTemporaryIPCBlobChild() override;
 
   virtual bool DeallocPTemporaryIPCBlobChild(
       PTemporaryIPCBlobChild* aActor) override;
 
-  virtual PFileCreatorChild* AllocPFileCreatorChild(
-      const nsString& aFullPath, const nsString& aType, const nsString& aName,
-      const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-      const bool& aIsFromNsIFile) override;
-
-  virtual bool DeallocPFileCreatorChild(PFileCreatorChild* aActor) override;
-
   virtual mozilla::dom::PRemoteWorkerChild* AllocPRemoteWorkerChild(
       const RemoteWorkerData& aData) override;
 
   virtual mozilla::ipc::IPCResult RecvPRemoteWorkerConstructor(
       PRemoteWorkerChild* aActor, const RemoteWorkerData& aData) override;
 
   virtual bool DeallocPRemoteWorkerChild(
       mozilla::dom::PRemoteWorkerChild* aActor) override;
--- a/ipc/glue/BackgroundParentImpl.cpp
+++ b/ipc/glue/BackgroundParentImpl.cpp
@@ -12,34 +12,32 @@
 #  include "CamerasParent.h"
 #endif
 #include "mozilla/media/MediaParent.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/ClientManagerActors.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DOMTypes.h"
 #include "mozilla/dom/EndpointForReportParent.h"
-#include "mozilla/dom/FileCreatorParent.h"
 #include "mozilla/dom/FileSystemBase.h"
 #include "mozilla/dom/FileSystemRequestParent.h"
 #include "mozilla/dom/GamepadEventChannelParent.h"
 #include "mozilla/dom/GamepadTestChannelParent.h"
 #include "mozilla/dom/PGamepadEventChannelParent.h"
 #include "mozilla/dom/PGamepadTestChannelParent.h"
 #include "mozilla/dom/MessagePortParent.h"
-#include "mozilla/dom/PendingIPCBlobParent.h"
 #include "mozilla/dom/ServiceWorkerActors.h"
 #include "mozilla/dom/ServiceWorkerManagerParent.h"
 #include "mozilla/dom/ServiceWorkerRegistrar.h"
 #include "mozilla/dom/StorageActivityService.h"
-#include "mozilla/dom/TemporaryIPCBlobParent.h"
 #include "mozilla/dom/cache/ActorUtils.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
-#include "mozilla/dom/IPCBlobInputStreamParent.h"
-#include "mozilla/dom/IPCBlobUtils.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
+#include "mozilla/dom/ipc/PendingIPCBlobParent.h"
+#include "mozilla/dom/ipc/TemporaryIPCBlobParent.h"
 #include "mozilla/dom/localstorage/ActorsParent.h"
 #include "mozilla/dom/quota/ActorsParent.h"
 #include "mozilla/dom/simpledb/ActorsParent.h"
 #include "mozilla/dom/RemoteWorkerParent.h"
 #include "mozilla/dom/RemoteWorkerServiceParent.h"
 #include "mozilla/dom/ReportingHeader.h"
 #include "mozilla/dom/SharedWorkerParent.h"
 #include "mozilla/dom/StorageIPC.h"
@@ -53,17 +51,16 @@
 #include "mozilla/ipc/PBackgroundTestParent.h"
 #include "mozilla/ipc/PChildToParentStreamParent.h"
 #include "mozilla/ipc/PParentToChildStreamParent.h"
 #include "mozilla/layout/VsyncParent.h"
 #include "mozilla/net/HttpBackgroundChannelParent.h"
 #include "mozilla/dom/network/UDPSocketParent.h"
 #include "mozilla/dom/WebAuthnTransactionParent.h"
 #include "mozilla/Preferences.h"
-#include "mozilla/StaticPrefs.h"
 #include "nsNetUtil.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsProxyRelease.h"
 #include "mozilla/RefPtr.h"
 #include "nsThreadUtils.h"
 #include "nsTraceRefcnt.h"
 #include "nsXULAppAPI.h"
 
@@ -463,23 +460,23 @@ bool BackgroundParentImpl::DeallocPBackg
     PBackgroundStorageParent* aActor) {
   AssertIsInMainOrSocketProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   return mozilla::dom::DeallocPBackgroundStorageParent(aActor);
 }
 
-mozilla::dom::PPendingIPCBlobParent*
-BackgroundParentImpl::AllocPPendingIPCBlobParent(const IPCBlob& aBlob) {
+PPendingIPCBlobParent* BackgroundParentImpl::AllocPPendingIPCBlobParent(
+    const IPCBlob& aBlob) {
   MOZ_CRASH("PPendingIPCBlobParent actors should be manually constructed!");
 }
 
 bool BackgroundParentImpl::DeallocPPendingIPCBlobParent(
-    mozilla::dom::PPendingIPCBlobParent* aActor) {
+    PPendingIPCBlobParent* aActor) {
   AssertIsInMainOrSocketProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
   delete aActor;
   return true;
 }
 
@@ -536,109 +533,62 @@ IPCResult BackgroundParentImpl::RecvPSha
 
 bool BackgroundParentImpl::DeallocPSharedWorkerParent(
     mozilla::dom::PSharedWorkerParent* aActor) {
   RefPtr<mozilla::dom::SharedWorkerParent> actor =
       dont_AddRef(static_cast<mozilla::dom::SharedWorkerParent*>(aActor));
   return true;
 }
 
-dom::PFileCreatorParent* BackgroundParentImpl::AllocPFileCreatorParent(
-    const nsString& aFullPath, const nsString& aType, const nsString& aName,
-    const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-    const bool& aIsFromNsIFile) {
-  RefPtr<dom::FileCreatorParent> actor = new dom::FileCreatorParent();
-  return actor.forget().take();
-}
-
-mozilla::ipc::IPCResult BackgroundParentImpl::RecvPFileCreatorConstructor(
-    dom::PFileCreatorParent* aActor, const nsString& aFullPath,
-    const nsString& aType, const nsString& aName,
-    const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-    const bool& aIsFromNsIFile) {
-  bool isFileRemoteType = false;
-
-  // If the ContentParent is null we are dealing with a same-process actor.
-  RefPtr<ContentParent> parent = BackgroundParent::GetContentParent(this);
-  if (!parent) {
-    isFileRemoteType = true;
-  } else {
-    isFileRemoteType = parent->GetRemoteType().EqualsLiteral(FILE_REMOTE_TYPE);
-    NS_ReleaseOnMainThreadSystemGroup("ContentParent release", parent.forget());
-  }
-
-  dom::FileCreatorParent* actor = static_cast<dom::FileCreatorParent*>(aActor);
-
-  // We allow the creation of File via this IPC call only for the 'file' process
-  // or for testing.
-  if (!isFileRemoteType && !StaticPrefs::dom_file_createInChild()) {
-    Unused << dom::FileCreatorParent::Send__delete__(
-        actor, dom::FileCreationErrorResult(NS_ERROR_DOM_INVALID_STATE_ERR));
-    return IPC_OK();
-  }
-
-  return actor->CreateAndShareFile(aFullPath, aType, aName, aLastModified,
-                                   aExistenceCheck, aIsFromNsIFile);
-}
-
-bool BackgroundParentImpl::DeallocPFileCreatorParent(
-    dom::PFileCreatorParent* aActor) {
-  RefPtr<dom::FileCreatorParent> actor =
-      dont_AddRef(static_cast<dom::FileCreatorParent*>(aActor));
-  return true;
-}
-
-dom::PTemporaryIPCBlobParent*
-BackgroundParentImpl::AllocPTemporaryIPCBlobParent() {
-  return new dom::TemporaryIPCBlobParent();
+PTemporaryIPCBlobParent* BackgroundParentImpl::AllocPTemporaryIPCBlobParent() {
+  return new mozilla::dom::TemporaryIPCBlobParent();
 }
 
 mozilla::ipc::IPCResult BackgroundParentImpl::RecvPTemporaryIPCBlobConstructor(
-    dom::PTemporaryIPCBlobParent* aActor) {
-  dom::TemporaryIPCBlobParent* actor =
-      static_cast<dom::TemporaryIPCBlobParent*>(aActor);
+    PTemporaryIPCBlobParent* aActor) {
+  mozilla::dom::TemporaryIPCBlobParent* actor =
+      static_cast<mozilla::dom::TemporaryIPCBlobParent*>(aActor);
   return actor->CreateAndShareFile();
 }
 
 bool BackgroundParentImpl::DeallocPTemporaryIPCBlobParent(
-    dom::PTemporaryIPCBlobParent* aActor) {
+    PTemporaryIPCBlobParent* aActor) {
   delete aActor;
   return true;
 }
 
-dom::PIPCBlobInputStreamParent*
-BackgroundParentImpl::AllocPIPCBlobInputStreamParent(const nsID& aID,
-                                                     const uint64_t& aSize) {
+PIPCBlobInputStreamParent* BackgroundParentImpl::AllocPIPCBlobInputStreamParent(
+    const nsID& aID, const uint64_t& aSize) {
   AssertIsInMainOrSocketProcess();
   AssertIsOnBackgroundThread();
 
-  RefPtr<dom::IPCBlobInputStreamParent> actor =
-      dom::IPCBlobInputStreamParent::Create(aID, aSize, this);
+  RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
+      mozilla::dom::IPCBlobInputStreamParent::Create(aID, aSize, this);
   return actor.forget().take();
 }
 
 mozilla::ipc::IPCResult
 BackgroundParentImpl::RecvPIPCBlobInputStreamConstructor(
-    dom::PIPCBlobInputStreamParent* aActor, const nsID& aID,
-    const uint64_t& aSize) {
-  if (!static_cast<dom::IPCBlobInputStreamParent*>(aActor)->HasValidStream()) {
+    PIPCBlobInputStreamParent* aActor, const nsID& aID, const uint64_t& aSize) {
+  if (!static_cast<mozilla::dom::IPCBlobInputStreamParent*>(aActor)
+           ->HasValidStream()) {
     return IPC_FAIL_NO_REASON(this);
   }
 
   return IPC_OK();
 }
 
 bool BackgroundParentImpl::DeallocPIPCBlobInputStreamParent(
-    dom::PIPCBlobInputStreamParent* aActor) {
+    PIPCBlobInputStreamParent* aActor) {
   AssertIsInMainOrSocketProcess();
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aActor);
 
-  RefPtr<dom::IPCBlobInputStreamParent> actor =
-      dont_AddRef(static_cast<dom::IPCBlobInputStreamParent*>(aActor));
+  RefPtr<mozilla::dom::IPCBlobInputStreamParent> actor =
+      dont_AddRef(static_cast<mozilla::dom::IPCBlobInputStreamParent*>(aActor));
   return true;
 }
 
 PFileDescriptorSetParent* BackgroundParentImpl::AllocPFileDescriptorSetParent(
     const FileDescriptor& aFileDescriptor) {
   AssertIsInMainOrSocketProcess();
   AssertIsOnBackgroundThread();
 
--- a/ipc/glue/BackgroundParentImpl.h
+++ b/ipc/glue/BackgroundParentImpl.h
@@ -150,29 +150,16 @@ class BackgroundParentImpl : public PBac
   virtual PTemporaryIPCBlobParent* AllocPTemporaryIPCBlobParent() override;
 
   virtual mozilla::ipc::IPCResult RecvPTemporaryIPCBlobConstructor(
       PTemporaryIPCBlobParent* actor) override;
 
   virtual bool DeallocPTemporaryIPCBlobParent(
       PTemporaryIPCBlobParent* aActor) override;
 
-  virtual PFileCreatorParent* AllocPFileCreatorParent(
-      const nsString& aFullPath, const nsString& aType, const nsString& aName,
-      const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-      const bool& aIsFromNsIFile) override;
-
-  virtual mozilla::ipc::IPCResult RecvPFileCreatorConstructor(
-      PFileCreatorParent* actor, const nsString& aFullPath,
-      const nsString& aType, const nsString& aName,
-      const Maybe<int64_t>& aLastModified, const bool& aExistenceCheck,
-      const bool& aIsFromNsIFile) override;
-
-  virtual bool DeallocPFileCreatorParent(PFileCreatorParent* aActor) override;
-
   virtual mozilla::dom::PRemoteWorkerParent* AllocPRemoteWorkerParent(
       const RemoteWorkerData& aData) override;
 
   virtual bool DeallocPRemoteWorkerParent(PRemoteWorkerParent* aActor) override;
 
   virtual mozilla::dom::PRemoteWorkerServiceParent*
   AllocPRemoteWorkerServiceParent() override;
 
--- a/ipc/glue/InputStreamUtils.cpp
+++ b/ipc/glue/InputStreamUtils.cpp
@@ -5,18 +5,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "InputStreamUtils.h"
 
 #include "nsIIPCSerializableInputStream.h"
 
 #include "mozilla/Assertions.h"
 #include "mozilla/dom/File.h"
-#include "mozilla/dom/IPCBlobInputStream.h"
-#include "mozilla/dom/IPCBlobInputStreamStorage.h"
+#include "mozilla/dom/ipc/IPCBlobInputStream.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
 #include "mozilla/ipc/IPCStreamDestination.h"
 #include "mozilla/ipc/IPCStreamSource.h"
 #include "mozilla/InputStreamLengthHelper.h"
 #include "mozilla/SlicedInputStream.h"
 #include "mozilla/InputStreamLengthWrapper.h"
 #include "nsComponentManagerUtils.h"
 #include "nsDebug.h"
 #include "nsIAsyncInputStream.h"
--- a/ipc/glue/PBackground.ipdl
+++ b/ipc/glue/PBackground.ipdl
@@ -24,17 +24,16 @@ include protocol PGamepadEventChannel;
 include protocol PGamepadTestChannel;
 include protocol PHttpBackgroundChannel;
 include protocol PIPCBlobInputStream;
 include protocol PPendingIPCBlob;
 include protocol PRemoteWorker;
 include protocol PRemoteWorkerService;
 include protocol PSharedWorker;
 include protocol PTemporaryIPCBlob;
-include protocol PFileCreator;
 include protocol PMessagePort;
 include protocol PCameras;
 include protocol PMIDIManager;
 include protocol PMIDIPort;
 include protocol PQuota;
 include protocol PChildToParentStream;
 include protocol PParentToChildStream;
 include protocol PServiceWorker;
@@ -90,17 +89,16 @@ sync protocol PBackground
   manages PGamepadTestChannel;
   manages PHttpBackgroundChannel;
   manages PIPCBlobInputStream;
   manages PPendingIPCBlob;
   manages PRemoteWorker;
   manages PRemoteWorkerService;
   manages PSharedWorker;
   manages PTemporaryIPCBlob;
-  manages PFileCreator;
   manages PMessagePort;
   manages PCameras;
   manages PMIDIManager;
   manages PMIDIPort;
   manages PQuota;
   manages PChildToParentStream;
   manages PParentToChildStream;
   manages PServiceWorker;
@@ -194,20 +192,16 @@ parent:
   async PWebAuthnTransaction();
 
   async PSharedWorker(RemoteWorkerData data,
                       uint64_t windowID,
                       MessagePortIdentifier portIdentifier);
 
   async PTemporaryIPCBlob();
 
-  async PFileCreator(nsString aFullPath, nsString aType, nsString aName,
-                     int64_t? lastModified, bool aExistenceCheck,
-                     bool aIsFromNsIFile);
-
   async PClientManager();
 
   async PMIDIManager();
   async PMIDIPort(MIDIPortInfo portInfo, bool sysexEnabled);
 
   // This method is used to propagate storage activities from the child actor
   // to the parent actor. See StorageActivityService.
   async StorageActivity(PrincipalInfo principalInfo);
@@ -229,17 +223,16 @@ child:
   async PCache();
   async PCacheStreamControl();
 
   async PParentToChildStream();
 
   async PPendingIPCBlob(IPCBlob blob);
 
   async PRemoteWorker(RemoteWorkerData data);
-
 both:
   // PIPCBlobInputStream is created on the parent side only if the child starts
   // a migration.
   async PIPCBlobInputStream(nsID aID, uint64_t aSize);
 
   async PFileDescriptorSet(FileDescriptor fd);
 };
 
--- a/ipc/ipdl/ipdl/direct_call.py
+++ b/ipc/ipdl/ipdl/direct_call.py
@@ -37,20 +37,32 @@ DIRECT_CALL_OVERRIDES = {
     ("PGMP", "parent"): ("GMPParent", "GMPParent.h"),
     ("PGMPContent", "child"): ("GMPContentChild", "GMPContentChild.h"),
     ("PGMPStorage", "child"): ("GMPStorageChild", "GMPStorageChild.h"),
     ("PGMPTimer", "child"): ("GMPTimerChild", "GMPTimerChild.h"),
     ("PGMPTimer", "parent"): ("GMPTimerParent", "GMPTimerParent.h"),
     ("PGMPVideoEncoder", "child"): ("GMPVideoEncoderChild", "GMPVideoEncoderChild.h"),
     ("PGMPVideoDecoder", "child"): ("GMPVideoDecoderChild", "GMPVideoDecoderChild.h"),
 
+    ("PIPCBlobInputStream", "child"): (
+        "mozilla::dom::IPCBlobInputStreamChild", "mozilla/dom/ipc/IPCBlobInputStreamChild.h"
+    ),
+    ("PIPCBlobInputStream", "parent"): (
+        "mozilla::dom::IPCBlobInputStreamParent", "mozilla/dom/ipc/IPCBlobInputStreamParent.h"
+    ),
+
     ("PLoginReputation", "parent"): ("LoginReputationParent", "mozilla/LoginReputationIPC.h"),
 
     ("PMedia", "child"): ("Child", "mozilla/media/MediaChild.h"),
 
+    ("PPendingIPCBlob", "child"): ("PendingIPCBlobChild", "mozilla/dom/ipc/PendingIPCBlobChild.h"),
+    ("PPendingIPCBlob", "parent"): (
+        "mozilla::dom::PendingIPCBlobParent", "mozilla/dom/ipc/PendingIPCBlobParent.h"
+    ),
+
     ("PPresentationRequest", "child"): (
         "PresentationRequestChild", "mozilla/dom/PresentationChild.h"
     ),
     ("PPresentationRequest", "parent"): (
         "PresentationRequestParent", "mozilla/dom/PresentationParent.h"
     ),
 
     ("PPrinting", "child"): ("nsPrintingProxy", "nsPrintingProxy.h"),
@@ -81,16 +93,23 @@ DIRECT_CALL_OVERRIDES = {
     ),
     ("PTCPSocket", "child"): (
         "mozilla::dom::TCPSocketChild", "mozilla/dom/network/TCPSocketChild.h"
     ),
     ("PTCPSocket", "parent"): (
         "mozilla::dom::TCPSocketParent", "mozilla/dom/network/TCPSocketParent.h"
     ),
 
+    ("PTemporaryIPCBlob", "child"): (
+        "mozilla::dom::TemporaryIPCBlobChild", "mozilla/dom/ipc/TemporaryIPCBlobChild.h"
+    ),
+    ("PTemporaryIPCBlob", "parent"): (
+        "mozilla::dom::TemporaryIPCBlobParent", "mozilla/dom/ipc/TemporaryIPCBlobParent.h"
+    ),
+
     ("PTestShellCommand", "parent"): ("TestShellCommandParent", "mozilla/ipc/TestShellParent.h"),
 
     ("PTransportProvider", "child"): (
         "TransportProviderChild", "mozilla/net/IPCTransportProvider.h"
     ),
     ("PTransportProvider", "parent"): (
         "TransportProviderParent", "mozilla/net/IPCTransportProvider.h"
     ),
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -108,18 +108,18 @@
 #include "DecoderDoctorLogger.h"
 #include "MediaDecoder.h"
 #include "mozilla/ClearSiteData.h"
 #include "mozilla/EditorController.h"
 #include "mozilla/Fuzzyfox.h"
 #include "mozilla/HTMLEditorController.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/StaticPresData.h"
-#include "mozilla/dom/IPCBlobInputStreamStorage.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
+#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
 #include "mozilla/dom/U2FTokenManager.h"
 #ifdef OS_WIN
 #  include "mozilla/dom/WinWebAuthnManager.h"
 #endif
 #include "mozilla/dom/PointerEventHandler.h"
 #include "mozilla/dom/RemoteWorkerService.h"
 #include "mozilla/dom/BlobURLProtocolHandler.h"
 #include "mozilla/dom/ReportingHeader.h"
--- a/modules/libpref/init/StaticPrefList.h
+++ b/modules/libpref/init/StaticPrefList.h
@@ -585,24 +585,16 @@ VARCACHE_PREF(
 )
 
 VARCACHE_PREF(
   "dom.storage_access.auto_grants.delayed",
    dom_storage_access_auto_grants_delayed,
   bool, true
 )
 
-// Allow the content process to create a File from a path. This is allowed just
-// on parent process, on 'file' Content process, or for testing.
-VARCACHE_PREF(
-  "dom.file.createInChild",
-   dom_file_createInChild,
-  RelaxedAtomicBool, false
-)
-
 //---------------------------------------------------------------------------
 // Extension prefs
 //---------------------------------------------------------------------------
 
 #ifdef ANDROID
 // Private browsing opt-in is only supported on Firefox desktop.
 # define PREF_VALUE true
 #else