Backed out changeset 806c3d121dd4 (bug 1321261) for timing out in test_fileapi.html, test_mozfiledataurl.html and test_nonascii_blob_url.html on Linux x64 asan and debug. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 01 Dec 2016 11:05:56 +0100
changeset 359279 3245e69aa698265f4ff511fda5fccaa35b112f90
parent 359278 db70aca765dc6400864e16701f4c9d42866ad713
child 359280 5aed641991289628f67ee101857c56dca75d1c7e
push idunknown
push userunknown
push dateunknown
reviewersbackout
bugs1321261
milestone53.0a1
backs out806c3d121dd45fa9af850d287f61d76e33dd08f1
Backed out changeset 806c3d121dd4 (bug 1321261) for timing out in test_fileapi.html, test_mozfiledataurl.html and test_nonascii_blob_url.html on Linux x64 asan and debug. r=backout
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
dom/base/BlobSet.cpp
dom/base/BlobSet.h
dom/base/File.cpp
dom/base/File.h
dom/base/FileList.cpp
dom/base/FileList.h
dom/base/FileReader.cpp
dom/base/FileReader.h
dom/base/MultipartBlobImpl.cpp
dom/base/MultipartBlobImpl.h
dom/base/MutableBlobStorage.cpp
dom/base/MutableBlobStorage.h
dom/base/MutableBlobStreamListener.cpp
dom/base/MutableBlobStreamListener.h
dom/base/StructuredCloneHolder.cpp
dom/base/moz.build
dom/base/nsDOMNavigationTiming.cpp
dom/base/nsHostObjectProtocolHandler.cpp
dom/base/nsHostObjectProtocolHandler.h
dom/base/nsHostObjectURI.cpp
dom/base/nsHostObjectURI.h
dom/base/nsIDOMBlob.idl
dom/base/nsIDOMFileList.idl
dom/base/test/file_blobURL_expiring.html
dom/base/test/file_nonascii_blob_url.html
dom/base/test/fileutils.js
dom/base/test/mochitest.ini
dom/base/test/test_blobURL_expiring.html
dom/base/test/test_blob_fragment_and_query.html
dom/base/test/test_blobconstructor.html
dom/base/test/test_file_from_blob.html
dom/base/test/test_file_negative_date.html
dom/base/test/test_fileapi.html
dom/base/test/test_fileapi_slice.html
dom/base/test/test_ipc_messagemanager_blob.html
dom/base/test/test_mozfiledataurl.html
dom/base/test/test_nonascii_blob_url.html
dom/file/BlobSet.cpp
dom/file/BlobSet.h
dom/file/File.cpp
dom/file/File.h
dom/file/FileList.cpp
dom/file/FileList.h
dom/file/FileReader.cpp
dom/file/FileReader.h
dom/file/MultipartBlobImpl.cpp
dom/file/MultipartBlobImpl.h
dom/file/MutableBlobStorage.cpp
dom/file/MutableBlobStorage.h
dom/file/MutableBlobStreamListener.cpp
dom/file/MutableBlobStreamListener.h
dom/file/ipc/Blob.cpp
dom/file/ipc/BlobChild.h
dom/file/ipc/BlobParent.h
dom/file/ipc/BlobTypes.ipdlh
dom/file/ipc/PBlob.ipdl
dom/file/ipc/PBlobStream.ipdl
dom/file/ipc/moz.build
dom/file/ipc/nsIRemoteBlob.h
dom/file/moz.build
dom/file/nsHostObjectProtocolHandler.cpp
dom/file/nsHostObjectProtocolHandler.h
dom/file/nsHostObjectURI.cpp
dom/file/nsHostObjectURI.h
dom/file/nsIDOMBlob.idl
dom/file/nsIDOMFileList.idl
dom/file/tests/file_blobURL_expiring.html
dom/file/tests/file_nonascii_blob_url.html
dom/file/tests/fileutils.js
dom/file/tests/mochitest.ini
dom/file/tests/test_blobURL_expiring.html
dom/file/tests/test_blob_fragment_and_query.html
dom/file/tests/test_blobconstructor.html
dom/file/tests/test_file_from_blob.html
dom/file/tests/test_file_negative_date.html
dom/file/tests/test_fileapi.html
dom/file/tests/test_fileapi_slice.html
dom/file/tests/test_ipc_messagemanager_blob.html
dom/file/tests/test_mozfiledataurl.html
dom/file/tests/test_nonascii_blob_url.html
dom/ipc/Blob.cpp
dom/ipc/BlobChild.h
dom/ipc/BlobParent.h
dom/ipc/BlobTypes.ipdlh
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/PBlob.ipdl
dom/ipc/PBlobStream.ipdl
dom/ipc/TabParent.cpp
dom/ipc/moz.build
dom/ipc/nsIRemoteBlob.h
dom/moz.build
dom/xhr/moz.build
image/ImageCacheKey.cpp
mobile/android/installer/package-manifest.in
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -145,17 +145,16 @@
 @RESPATH@/components/cookie.xpt
 @RESPATH@/components/directory.xpt
 @RESPATH@/components/diskspacewatcher.xpt
 @RESPATH@/components/docshell.xpt
 @RESPATH@/components/dom.xpt
 @RESPATH@/components/dom_activities.xpt
 @RESPATH@/components/dom_audiochannel.xpt
 @RESPATH@/components/dom_base.xpt
-@RESPATH@/components/dom_file.xpt
 @RESPATH@/components/dom_system.xpt
 @RESPATH@/components/dom_workers.xpt
 #ifdef MOZ_WIDGET_GONK
 @RESPATH@/components/dom_wifi.xpt
 @RESPATH@/components/dom_system_gonk.xpt
 #endif
 @RESPATH@/components/dom_canvas.xpt
 @RESPATH@/components/dom_core.xpt
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -185,17 +185,16 @@
 @RESPATH@/components/content_webrtc.xpt
 #endif
 @RESPATH@/components/content_xslt.xpt
 @RESPATH@/components/cookie.xpt
 @RESPATH@/components/directory.xpt
 @RESPATH@/components/docshell.xpt
 @RESPATH@/components/dom.xpt
 @RESPATH@/components/dom_base.xpt
-@RESPATH@/components/dom_file.xpt
 @RESPATH@/components/dom_system.xpt
 @RESPATH@/components/dom_canvas.xpt
 @RESPATH@/components/dom_core.xpt
 @RESPATH@/components/dom_css.xpt
 @RESPATH@/components/dom_events.xpt
 @RESPATH@/components/dom_geolocation.xpt
 @RESPATH@/components/dom_media.xpt
 @RESPATH@/components/dom_network.xpt
rename from dom/file/BlobSet.cpp
rename to dom/base/BlobSet.cpp
rename from dom/file/BlobSet.h
rename to dom/base/BlobSet.h
--- a/dom/file/BlobSet.h
+++ b/dom/base/BlobSet.h
@@ -2,20 +2,17 @@
 /* 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_BlobSet_h
 #define mozilla_dom_BlobSet_h
 
-#include "jsapi.h"
 #include "mozilla/RefPtr.h"
-#include "nsString.h"
-#include "nsTArray.h"
 
 namespace mozilla {
 namespace dom {
 
 class BlobImpl;
 
 class BlobSet final
 {
rename from dom/file/File.cpp
rename to dom/base/File.cpp
--- a/dom/file/File.cpp
+++ b/dom/base/File.cpp
@@ -1,32 +1,32 @@
 /* -*- 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 "mozilla/dom/File.h"
 
-#include "ipc/nsIRemoteBlob.h"
 #include "MultipartBlobImpl.h"
 #include "nsCExternalHandlerService.h"
 #include "nsContentCID.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "nsICharsetDetector.h"
 #include "nsIConverterInputStream.h"
 #include "nsIDocument.h"
 #include "nsIFileStreams.h"
 #include "nsIInputStream.h"
 #include "nsIIPCSerializableInputStream.h"
 #include "nsIMIMEService.h"
 #include "nsISeekableStream.h"
 #include "nsIUnicharInputStream.h"
 #include "nsIUnicodeDecoder.h"
+#include "nsIRemoteBlob.h"
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 #include "nsIUUIDGenerator.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "nsStringStream.h"
 #include "nsJSUtils.h"
 #include "nsPrintfCString.h"
 #include "mozilla/SHA1.h"
rename from dom/file/File.h
rename to dom/base/File.h
rename from dom/file/FileList.cpp
rename to dom/base/FileList.cpp
rename from dom/file/FileList.h
rename to dom/base/FileList.h
rename from dom/file/FileReader.cpp
rename to dom/base/FileReader.cpp
rename from dom/file/FileReader.h
rename to dom/base/FileReader.h
rename from dom/file/MultipartBlobImpl.cpp
rename to dom/base/MultipartBlobImpl.cpp
rename from dom/file/MultipartBlobImpl.h
rename to dom/base/MultipartBlobImpl.h
rename from dom/file/MutableBlobStorage.cpp
rename to dom/base/MutableBlobStorage.cpp
--- a/dom/file/MutableBlobStorage.cpp
+++ b/dom/base/MutableBlobStorage.cpp
@@ -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/. */
 
 #include "mozilla/dom/MutableBlobStorage.h"
 #include "mozilla/CheckedInt.h"
 #include "mozilla/dom/File.h"
 #include "nsAnonymousTemporaryFile.h"
 #include "nsNetCID.h"
-#include "nsProxyRelease.h"
 #include "WorkerPrivate.h"
 
 #define BLOB_MEMORY_TEMPORARY_FILE 1048576
 
 namespace mozilla {
 namespace dom {
 
 namespace {
rename from dom/file/MutableBlobStorage.h
rename to dom/base/MutableBlobStorage.h
rename from dom/file/MutableBlobStreamListener.cpp
rename to dom/base/MutableBlobStreamListener.cpp
rename from dom/file/MutableBlobStreamListener.h
rename to dom/base/MutableBlobStreamListener.h
--- a/dom/base/StructuredCloneHolder.cpp
+++ b/dom/base/StructuredCloneHolder.cpp
@@ -16,17 +16,16 @@
 #include "mozilla/dom/FileList.h"
 #include "mozilla/dom/FileListBinding.h"
 #include "mozilla/dom/FormData.h"
 #include "mozilla/dom/ImageBitmap.h"
 #include "mozilla/dom/ImageBitmapBinding.h"
 #include "mozilla/dom/ImageData.h"
 #include "mozilla/dom/ImageDataBinding.h"
 #include "mozilla/dom/ipc/BlobChild.h"
-#include "mozilla/dom/ipc/nsIRemoteBlob.h"
 #include "mozilla/dom/StructuredClone.h"
 #include "mozilla/dom/MessagePort.h"
 #include "mozilla/dom/MessagePortBinding.h"
 #include "mozilla/dom/OffscreenCanvas.h"
 #include "mozilla/dom/OffscreenCanvasBinding.h"
 #include "mozilla/dom/PMessagePort.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "mozilla/dom/SubtleCryptoBinding.h"
@@ -34,16 +33,17 @@
 #include "mozilla/dom/URLSearchParams.h"
 #include "mozilla/dom/URLSearchParamsBinding.h"
 #include "mozilla/dom/WebCryptoCommon.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "MultipartBlobImpl.h"
+#include "nsIRemoteBlob.h"
 #include "nsQueryObject.h"
 
 #ifdef MOZ_WEBRTC
 #include "mozilla/dom/RTCCertificate.h"
 #include "mozilla/dom/RTCCertificateBinding.h"
 #endif
 
 using namespace mozilla::ipc;
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -6,19 +6,21 @@
 
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'mozIDOMWindow.idl',
     'nsIContentPolicy.idl',
     'nsIContentPolicyBase.idl',
     'nsIDocumentEncoder.idl',
+    'nsIDOMBlob.idl',
     'nsIDOMDataChannel.idl',
     'nsIDOMDOMCursor.idl',
     'nsIDOMDOMRequest.idl',
+    'nsIDOMFileList.idl',
     'nsIDOMFormData.idl',
     'nsIDOMParser.idl',
     'nsIDOMSerializer.idl',
     'nsIDroppedLinkHandler.idl',
     'nsIFrameLoader.idl',
     'nsIImageLoadingContent.idl',
     'nsIMessageManager.idl',
     'nsIObjectLoadingContent.idl',
@@ -71,16 +73,18 @@ EXPORTS += [
     'nsDOMJSUtils.h',
     'nsDOMNavigationTiming.h',
     'nsDOMString.h',
     'nsFocusManager.h',
     'nsFrameMessageManager.h',
     'nsGenericDOMDataNode.h',
     'nsGkAtomList.h',
     'nsGkAtoms.h',
+    'nsHostObjectProtocolHandler.h',
+    'nsHostObjectURI.h',
     'nsIAnimationObserver.h',
     'nsIAttribute.h',
     'nsIContent.h',
     'nsIContentInlines.h',
     'nsIContentIterator.h',
     'nsIContentSerializer.h',
     'nsIDocument.h',
     'nsIDocumentInlines.h',
@@ -142,16 +146,17 @@ EXPORTS.mozilla += [
     'UseCounter.h',
 ]
 
 EXPORTS.mozilla.dom += [
     '!UseCounterList.h',
     'AnonymousContent.h',
     'Attr.h',
     'BarProps.h',
+    'BlobSet.h',
     'BodyUtil.h',
     'BorrowedAttrInfo.h',
     'ChildIterator.h',
     'ChromeNodeList.h',
     'ChromeUtils.h',
     'Comment.h',
     'CustomElementRegistry.h',
     'DirectionalityUtils.h',
@@ -170,27 +175,32 @@ EXPORTS.mozilla.dom += [
     'DOMQuad.h',
     'DOMRect.h',
     'DOMRequest.h',
     'DOMStringList.h',
     'DOMTokenListSupportedTokens.h',
     'Element.h',
     'ElementInlines.h',
     'EventSource.h',
+    'File.h',
+    'FileList.h',
+    'FileReader.h',
     'FormData.h',
     'FragmentOrElement.h',
     'FromParser.h',
     'GroupedSHistory.h',
     'IdleDeadline.h',
     'IdleRequest.h',
     'ImageEncoder.h',
     'ImageTracker.h',
     'ImportManager.h',
     'Link.h',
     'Location.h',
+    'MutableBlobStorage.h',
+    'MutableBlobStreamListener.h',
     'NameSpaceConstants.h',
     'Navigator.h',
     'NodeInfo.h',
     'NodeInfoInlines.h',
     'NodeIterator.h',
     'PartialSHistory.h',
     'Pose.h',
     'ProcessGlobal.h',
@@ -211,16 +221,17 @@ EXPORTS.mozilla.dom += [
     'WebSocket.h',
     'WindowOrientationObserver.h',
 ]
 
 UNIFIED_SOURCES += [
     'AnonymousContent.cpp',
     'Attr.cpp',
     'BarProps.cpp',
+    'BlobSet.cpp',
     'BodyUtil.cpp',
     'BorrowedAttrInfo.cpp',
     'ChildIterator.cpp',
     'ChromeNodeList.cpp',
     'ChromeUtils.cpp',
     'Comment.cpp',
     'Crypto.cpp',
     'CustomElementRegistry.cpp',
@@ -237,26 +248,32 @@ UNIFIED_SOURCES += [
     'DOMParser.cpp',
     'DOMPoint.cpp',
     'DOMQuad.cpp',
     'DOMRect.cpp',
     'DOMRequest.cpp',
     'DOMStringList.cpp',
     'Element.cpp',
     'EventSource.cpp',
+    'File.cpp',
+    'FileList.cpp',
+    'FileReader.cpp',
     'FormData.cpp',
     'FragmentOrElement.cpp',
     'GroupedSHistory.cpp',
     'IdleDeadline.cpp',
     'IdleRequest.cpp',
     'ImageEncoder.cpp',
     'ImageTracker.cpp',
     'ImportManager.cpp',
     'Link.cpp',
     'Location.cpp',
+    'MultipartBlobImpl.cpp',
+    'MutableBlobStorage.cpp',
+    'MutableBlobStreamListener.cpp',
     'Navigator.cpp',
     'NodeInfo.cpp',
     'NodeIterator.cpp',
     'nsAtomListUtils.cpp',
     'nsAttrAndChildArray.cpp',
     'nsAttrValue.cpp',
     'nsAttrValueOrString.cpp',
     'nsCCUncollectableMarker.cpp',
@@ -280,16 +297,18 @@ UNIFIED_SOURCES += [
     'nsDOMWindowList.cpp',
     'nsFocusManager.cpp',
     'nsFrameLoader.cpp',
     'nsGenConImageContent.cpp',
     'nsGenericDOMDataNode.cpp',
     'nsGkAtoms.cpp',
     'nsGlobalWindowCommands.cpp',
     'nsHistory.cpp',
+    'nsHostObjectProtocolHandler.cpp',
+    'nsHostObjectURI.cpp',
     'nsHTMLContentSerializer.cpp',
     'nsIGlobalObject.cpp',
     'nsINode.cpp',
     'nsInProcessTabChildGlobal.cpp',
     'nsJSEnvironment.cpp',
     'nsJSTimeoutHandler.cpp',
     'nsJSUtils.cpp',
     'nsLineBreaker.cpp',
@@ -408,17 +427,16 @@ LOCAL_INCLUDES += [
     '../battery',
     '../events',
     '../media',
     '../network',
     '../time',
     '/caps',
     '/docshell/base',
     '/dom/base',
-    '/dom/file',
     '/dom/geolocation',
     '/dom/html',
     '/dom/ipc',
     '/dom/storage',
     '/dom/svg',
     '/dom/u2f',
     '/dom/workers',
     '/dom/xbl',
--- a/dom/base/nsDOMNavigationTiming.cpp
+++ b/dom/base/nsDOMNavigationTiming.cpp
@@ -10,19 +10,16 @@
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nsIScriptSecurityManager.h"
 #include "prtime.h"
 #include "nsIURI.h"
 #include "nsPrintfCString.h"
 #include "mozilla/dom/PerformanceNavigation.h"
 #include "mozilla/TimeStamp.h"
-#include "mozilla/Telemetry.h"
-
-using namespace mozilla;
 
 nsDOMNavigationTiming::nsDOMNavigationTiming()
 {
   Clear();
 }
 
 nsDOMNavigationTiming::~nsDOMNavigationTiming()
 {
@@ -50,36 +47,35 @@ nsDOMNavigationTiming::Clear()
   mDOMInteractiveSet = false;
   mDOMContentLoadedEventStartSet = false;
   mDOMContentLoadedEventEndSet = false;
   mDOMCompleteSet = false;
   mDocShellHasBeenActiveSinceNavigationStart = false;
 }
 
 DOMTimeMilliSec
-nsDOMNavigationTiming::TimeStampToDOM(TimeStamp aStamp) const
+nsDOMNavigationTiming::TimeStampToDOM(mozilla::TimeStamp aStamp) const
 {
   if (aStamp.IsNull()) {
     return 0;
   }
-
-  TimeDuration duration = aStamp - mNavigationStartTimeStamp;
+  mozilla::TimeDuration duration = aStamp - mNavigationStartTimeStamp;
   return GetNavigationStart() + static_cast<int64_t>(duration.ToMilliseconds());
 }
 
 DOMTimeMilliSec nsDOMNavigationTiming::DurationFromStart()
 {
-  return TimeStampToDOM(TimeStamp::Now());
+  return TimeStampToDOM(mozilla::TimeStamp::Now());
 }
 
 void
 nsDOMNavigationTiming::NotifyNavigationStart(DocShellState aDocShellState)
 {
   mNavigationStartHighRes = (double)PR_Now() / PR_USEC_PER_MSEC;
-  mNavigationStartTimeStamp = TimeStamp::Now();
+  mNavigationStartTimeStamp = mozilla::TimeStamp::Now();
   mDocShellHasBeenActiveSinceNavigationStart = (aDocShellState == DocShellState::eActive);
 }
 
 void
 nsDOMNavigationTiming::NotifyFetchStart(nsIURI* aURI, Type aNavigationType)
 {
   mNavigationType = aNavigationType;
   // At the unload event time we don't really know the loading uri.
@@ -126,17 +122,17 @@ nsDOMNavigationTiming::NotifyLoadEventEn
 {
   if (!mLoadEventEndSet) {
     mLoadEventEnd = DurationFromStart();
     mLoadEventEndSet = true;
   }
 }
 
 void
-nsDOMNavigationTiming::SetDOMLoadingTimeStamp(nsIURI* aURI, TimeStamp aValue)
+nsDOMNavigationTiming::SetDOMLoadingTimeStamp(nsIURI* aURI, mozilla::TimeStamp aValue)
 {
   if (!mDOMLoadingSet) {
     mLoadedURI = aURI;
     mDOMLoading = TimeStampToDOM(aValue);
     mDOMLoadingSet = true;
   }
 }
 
rename from dom/file/nsHostObjectProtocolHandler.cpp
rename to dom/base/nsHostObjectProtocolHandler.cpp
rename from dom/file/nsHostObjectProtocolHandler.h
rename to dom/base/nsHostObjectProtocolHandler.h
rename from dom/file/nsHostObjectURI.cpp
rename to dom/base/nsHostObjectURI.cpp
rename from dom/file/nsHostObjectURI.h
rename to dom/base/nsHostObjectURI.h
rename from dom/file/nsIDOMBlob.idl
rename to dom/base/nsIDOMBlob.idl
rename from dom/file/nsIDOMFileList.idl
rename to dom/base/nsIDOMFileList.idl
rename from dom/file/tests/file_blobURL_expiring.html
rename to dom/base/test/file_blobURL_expiring.html
rename from dom/file/tests/file_nonascii_blob_url.html
rename to dom/base/test/file_nonascii_blob_url.html
rename from dom/file/tests/fileutils.js
rename to dom/base/test/fileutils.js
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -185,16 +185,17 @@ support-files =
   file_xhtmlserializer_1_wrap.xhtml
   file_xhtmlserializer_2.xhtml
   file_xhtmlserializer_2_basic.xhtml
   file_xhtmlserializer_2_enthtml.xhtml
   file_xhtmlserializer_2_entw3c.xhtml
   file_xhtmlserializer_2_latin1.xhtml
   file_youtube_flash_embed.html
   fileapi_chromeScript.js
+  fileutils.js
   forRemoval.resource
   forRemoval.resource^headers^
   formReset.html
   invalid_accesscontrol.resource
   invalid_accesscontrol.resource^headers^
   mutationobserver_dialog.html
   orientationcommon.js
   script-1_bug597345.sjs
@@ -202,16 +203,17 @@ support-files =
   script_bug602838.sjs
   send_gzip_content.sjs
   somedatas.resource
   somedatas.resource^headers^
   variable_style_sheet.sjs
   viewport_helpers.js
   w3element_traversal.svg
   wholeTexty-helper.xml
+  file_nonascii_blob_url.html
   referrerHelper.js
   img_referrer_testserver.sjs
   file_audioLoop.html
   file_webaudioLoop.html
   file_webaudioLoop2.html
   file_pluginAudio.html
   file_pluginAudioNonAutoStart.html
   noaudio.webm
@@ -224,19 +226,22 @@ support-files =
   referrer_change_server.sjs
   file_change_policy_redirect.html
   file_bug1198095.js
   file_bug1250148.sjs
   file_bug1268962.sjs
   mozbrowser_api_utils.js
   websocket_helpers.js
   websocket_tests.js
+  !/dom/html/test/form_submit_server.sjs
   !/dom/security/test/cors/file_CrossSiteXHR_server.sjs
   !/image/test/mochitest/blue.png
+  !/dom/xhr/tests/file_XHRSendData.sjs
   script_bug1238440.js
+  file_blobURL_expiring.html
   intersectionobserver_iframe.html
   intersectionobserver_window.html
 
 [test_anchor_area_referrer.html]
 [test_anchor_area_referrer_changing.html]
 [test_anchor_area_referrer_invalid.html]
 [test_anchor_area_referrer_rel.html]
 [test_anonymousContent_api.html]
@@ -258,16 +263,19 @@ tags = audiochannel
 tags = audiochannel
 [test_audioNotificationStream.html]
 tags = audiochannel
 [test_audioNotificationStopOnNavigation.html]
 tags = audiochannel
 [test_audioNotificationWithEarlyPlay.html]
 tags = audiochannel
 [test_base.xhtml]
+[test_blob_fragment_and_query.html]
+[test_blobconstructor.html]
+[test_blobURL_expiring.html]
 [test_bug5141.html]
 [test_bug28293.html]
 [test_bug28293.xhtml]
 [test_bug51034.html]
 [test_bug116083.html]
 subsuite = clipboard
 [test_bug166235.html]
 subsuite = clipboard
@@ -634,16 +642,20 @@ skip-if = toolkit == 'android' || e10s #
 [test_e4x_for_each.html]
 [test_element.matches.html]
 [test_element_closest.html]
 [test_elementTraversal.html]
 [test_encodeToStringWithMaxLength.html]
 [test_error.html]
 [test_EventSource_redirects.html]
 [test_explicit_user_agent.html]
+[test_file_from_blob.html]
+[test_file_negative_date.html]
+[test_fileapi.html]
+[test_fileapi_slice.html]
 skip-if = (toolkit == 'android') # Android: Bug 775227
 [test_getAttribute_after_createAttribute.html]
 [test_getElementById.html]
 [test_getTranslationNodes.html]
 [test_getTranslationNodes_limit.html]
 [test_gsp-qualified.html]
 [test_gsp-quirks.html]
 [test_gsp-standards.html]
@@ -657,16 +669,17 @@ skip-if = (toolkit == 'android') # Andro
 [test_iframe_referrer_changing.html]
 [test_iframe_referrer_invalid.html]
 [test_Image_constructor.html]
 [test_img_referrer.html]
 [test_innersize_scrollport.html]
 [test_integer_attr_with_leading_zero.html]
 [test_intersectionobservers.html]
 skip-if = true # Track Bug 1320704
+[test_ipc_messagemanager_blob.html]
 [test_link_prefetch.html]
 skip-if = !e10s # Track Bug 1281415
 [test_link_stylesheet.html]
 [test_messagemanager_targetchain.html]
 [test_meta_viewport0.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport1.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
@@ -678,16 +691,18 @@ skip-if = (os != 'android')    # meta-vi
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport5.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport6.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_meta_viewport7.html]
 skip-if = (os != 'android')    # meta-viewport tag support is mobile-only
 [test_mozbrowser_apis_blocked.html]
+[test_mozfiledataurl.html]
+skip-if = toolkit == 'android' #TIMED_OUT
 [test_mozMatchesSelector.html]
 [test_mutationobserver_anonymous.html]
 [test_mutationobservers.html]
 [test_named_frames.html]
 [test_navigator_hardwareConcurrency.html]
 [test_navigator_language.html]
 [test_navigatorPrefOverride.html]
 [test_noAudioNotification.html]
@@ -698,16 +713,17 @@ tags = audiochannel
 tags = audiochannel
 [test_noAudioNotificationOnVolume0Element.html]
 tags = audiochannel
 [test_NodeIterator_basics_filters.xhtml]
 [test_NodeIterator_mutations_1.xhtml]
 [test_NodeIterator_mutations_2.html]
 [test_NodeIterator_mutations_3.html]
 [test_nodelist_holes.html]
+[test_nonascii_blob_url.html]
 [test_noWebAudioNotification.html]
 tags = audiochannel
 [test_open_null_features.html]
 [test_openDialogChromeOnly.html]
 tags = openwindow
 [test_orientation_alternate.html]
 skip-if = true # bug 1312417
 [test_orientation_frame.html]
rename from dom/file/tests/test_blobURL_expiring.html
rename to dom/base/test/test_blobURL_expiring.html
rename from dom/file/tests/test_blob_fragment_and_query.html
rename to dom/base/test/test_blob_fragment_and_query.html
rename from dom/file/tests/test_blobconstructor.html
rename to dom/base/test/test_blobconstructor.html
rename from dom/file/tests/test_file_from_blob.html
rename to dom/base/test/test_file_from_blob.html
rename from dom/file/tests/test_file_negative_date.html
rename to dom/base/test/test_file_negative_date.html
rename from dom/file/tests/test_fileapi.html
rename to dom/base/test/test_fileapi.html
rename from dom/file/tests/test_fileapi_slice.html
rename to dom/base/test/test_fileapi_slice.html
rename from dom/file/tests/test_ipc_messagemanager_blob.html
rename to dom/base/test/test_ipc_messagemanager_blob.html
rename from dom/file/tests/test_mozfiledataurl.html
rename to dom/base/test/test_mozfiledataurl.html
rename from dom/file/tests/test_nonascii_blob_url.html
rename to dom/base/test/test_nonascii_blob_url.html
deleted file mode 100644
--- a/dom/file/ipc/moz.build
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# 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/.
-
-EXPORTS.mozilla.dom.ipc += [
-    'BlobChild.h',
-    'BlobParent.h',
-    'nsIRemoteBlob.h',
-]
-
-UNIFIED_SOURCES += [
-    'Blob.cpp',
-]
-
-IPDL_SOURCES += [
-    'BlobTypes.ipdlh',
-    'PBlob.ipdl',
-    'PBlobStream.ipdl',
-]
-
-LOCAL_INCLUDES += [
-    '/dom/file',
-    '/dom/ipc',
-    '/dom/workers',
-]
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
-
-CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wno-error=shadow']
deleted file mode 100644
--- a/dom/file/moz.build
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# 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/.
-
-DIRS += ['ipc']
-
-XPIDL_SOURCES += [
-    'nsIDOMBlob.idl',
-    'nsIDOMFileList.idl',
-]
-
-XPIDL_MODULE = 'dom_file'
-
-EXPORTS += [
-    'nsHostObjectProtocolHandler.h',
-    'nsHostObjectURI.h',
-]
-
-EXPORTS.mozilla.dom += [
-    'BlobSet.h',
-    'File.h',
-    'FileList.h',
-    'FileReader.h',
-    'MutableBlobStorage.h',
-    'MutableBlobStreamListener.h',
-]
-
-UNIFIED_SOURCES += [
-    'BlobSet.cpp',
-    'File.cpp',
-    'FileList.cpp',
-    'FileReader.cpp',
-    'MultipartBlobImpl.cpp',
-    'MutableBlobStorage.cpp',
-    'MutableBlobStreamListener.cpp',
-    'nsHostObjectProtocolHandler.cpp',
-    'nsHostObjectURI.cpp',
-]
-
-LOCAL_INCLUDES += [
-    '/dom/workers',
-]
-
-MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
-
-include('/ipc/chromium/chromium-config.mozbuild')
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/dom/file/tests/mochitest.ini
+++ /dev/null
@@ -1,20 +0,0 @@
-[DEFAULT]
-support-files =
-  file_blobURL_expiring.html
-  file_nonascii_blob_url.html
-  fileutils.js
-  !/dom/html/test/form_submit_server.sjs
-  !/dom/xhr/tests/file_XHRSendData.sjs
-
-[test_blob_fragment_and_query.html]
-[test_blobconstructor.html]
-[test_blobURL_expiring.html]
-[test_file_from_blob.html]
-[test_ipc_messagemanager_blob.html]
-[test_nonascii_blob_url.html]
-[test_file_negative_date.html]
-[test_fileapi.html]
-[test_fileapi_slice.html]
-skip-if = (toolkit == 'android') # Android: Bug 775227
-[test_mozfiledataurl.html]
-skip-if = toolkit == 'android' #TIMED_OUT
rename from dom/file/ipc/Blob.cpp
rename to dom/ipc/Blob.cpp
--- a/dom/file/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -384,16 +384,30 @@ OptionalFileDescriptorSetToFDs(OptionalF
 
     default:
       MOZ_CRASH("Unknown type!");
   }
 
   MOZ_CRASH("Should never get here!");
 }
 
+class NS_NO_VTABLE IPrivateRemoteInputStream
+  : public nsISupports
+{
+public:
+  NS_DECLARE_STATIC_IID_ACCESSOR(PRIVATE_REMOTE_INPUT_STREAM_IID)
+
+  // This will return the underlying stream.
+  virtual nsIInputStream*
+  BlockAndGetInternalStream() = 0;
+};
+
+NS_DEFINE_STATIC_IID_ACCESSOR(IPrivateRemoteInputStream,
+                              PRIVATE_REMOTE_INPUT_STREAM_IID)
+
 // This class exists to keep a blob alive at least as long as its internal
 // stream.
 class BlobInputStreamTether final
   : public nsIMultiplexInputStream
   , public nsISeekableStream
   , public nsIIPCSerializableInputStream
   , public nsIFileMetadata
 {
@@ -465,32 +479,16 @@ NS_INTERFACE_MAP_BEGIN(BlobInputStreamTe
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsISeekableStream, mWeakSeekableStream)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIIPCSerializableInputStream,
                                      mWeakSerializableStream)
   NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIFileMetadata,
                                      mWeakFileMetadata)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInputStream)
 NS_INTERFACE_MAP_END
 
-} // namespace
-
-class NS_NO_VTABLE IPrivateRemoteInputStream
-  : public nsISupports
-{
-public:
-  NS_DECLARE_STATIC_IID_ACCESSOR(PRIVATE_REMOTE_INPUT_STREAM_IID)
-
-  // This will return the underlying stream.
-  virtual nsIInputStream*
-  BlockAndGetInternalStream() = 0;
-};
-
-NS_DEFINE_STATIC_IID_ACCESSOR(IPrivateRemoteInputStream,
-                              PRIVATE_REMOTE_INPUT_STREAM_IID)
-
 class RemoteInputStream final
   : public nsIInputStream
   , public nsISeekableStream
   , public nsIIPCSerializableInputStream
   , public nsIFileMetadata
   , public IPrivateRemoteInputStream
 {
   Monitor mMonitor;
@@ -555,18 +553,16 @@ private:
   NS_DECL_NSISEEKABLESTREAM
   NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM
   NS_DECL_NSIFILEMETADATA
 
   nsIInputStream*
   BlockAndGetInternalStream() override;
 };
 
-namespace {
-
 class InputStreamChild final
   : public PBlobStreamChild
 {
   RefPtr<RemoteInputStream> mRemoteStream;
 
 public:
   explicit
   InputStreamChild(RemoteInputStream* aRemoteStream)
@@ -583,16 +579,111 @@ public:
 
 private:
   // This method is only called by the IPDL message machinery.
   mozilla::ipc::IPCResult
   Recv__delete__(const InputStreamParams& aParams,
                  const OptionalFileDescriptorSet& aFDs) override;
 };
 
+class InputStreamParent final
+  : public PBlobStreamParent
+{
+  typedef mozilla::ipc::InputStreamParams InputStreamParams;
+  typedef mozilla::dom::OptionalFileDescriptorSet OptionalFileDescriptorSet;
+
+  bool* mSyncLoopGuard;
+  InputStreamParams* mParams;
+  OptionalFileDescriptorSet* mFDs;
+
+#ifdef DEBUG
+  PRThread* mOwningThread;
+#endif
+
+public:
+  InputStreamParent()
+    : mSyncLoopGuard(nullptr)
+    , mParams(nullptr)
+    , mFDs(nullptr)
+  {
+#ifdef DEBUG
+    mOwningThread = PR_GetCurrentThread();
+#endif
+
+    AssertIsOnOwningThread();
+
+    MOZ_COUNT_CTOR(InputStreamParent);
+  }
+
+  InputStreamParent(bool* aSyncLoopGuard,
+                    InputStreamParams* aParams,
+                    OptionalFileDescriptorSet* aFDs)
+    : mSyncLoopGuard(aSyncLoopGuard)
+    , mParams(aParams)
+    , mFDs(aFDs)
+  {
+#ifdef DEBUG
+    mOwningThread = PR_GetCurrentThread();
+#endif
+
+    AssertIsOnOwningThread();
+    MOZ_ASSERT(aSyncLoopGuard);
+    MOZ_ASSERT(!*aSyncLoopGuard);
+    MOZ_ASSERT(aParams);
+    MOZ_ASSERT(aFDs);
+
+    MOZ_COUNT_CTOR(InputStreamParent);
+  }
+
+  ~InputStreamParent() override
+  {
+    AssertIsOnOwningThread();
+
+    MOZ_COUNT_DTOR(InputStreamParent);
+  }
+
+  void
+  AssertIsOnOwningThread() const
+  {
+#ifdef DEBUG
+    MOZ_ASSERT(PR_GetCurrentThread() == mOwningThread);
+#endif
+  }
+
+  bool
+  Destroy(const InputStreamParams& aParams,
+          const OptionalFileDescriptorSet& aFDs)
+  {
+    AssertIsOnOwningThread();
+
+    if (mSyncLoopGuard) {
+      MOZ_ASSERT(!*mSyncLoopGuard);
+
+      *mSyncLoopGuard = true;
+      *mParams = aParams;
+      *mFDs = aFDs;
+
+      // We're not a live actor so manage the memory ourselves.
+      delete this;
+      return true;
+    }
+
+    // This will be destroyed by BlobParent::DeallocPBlobStreamParent.
+    return PBlobStreamParent::Send__delete__(this, aParams, aFDs);
+  }
+
+private:
+  // This method is only called by the IPDL message machinery.
+  void
+  ActorDestroy(ActorDestroyReason aWhy) override
+  {
+    // Nothing needs to be done here.
+  }
+};
+
 struct MOZ_STACK_CLASS CreateBlobImplMetadata final
 {
   nsString mContentType;
   nsString mName;
   uint64_t mLength;
   int64_t mLastModifiedDate;
   bool mHasRecursed;
 
@@ -613,18 +704,16 @@ struct MOZ_STACK_CLASS CreateBlobImplMet
 
   bool
   IsFile() const
   {
     return !mName.IsVoid();
   }
 };
 
-} // namespace
-
 already_AddRefed<BlobImpl>
 CreateBlobImpl(const nsID& aKnownBlobIDData,
                const CreateBlobImplMetadata& aMetadata)
 {
   MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
   MOZ_ASSERT(aMetadata.mHasRecursed);
 
   RefPtr<BlobImpl> blobImpl = BlobParent::GetBlobImplForID(aKnownBlobIDData);
@@ -1341,110 +1430,18 @@ RemoteInputStream::BlockAndGetInternalSt
   MOZ_ASSERT(!IsOnOwningThread());
 
   nsresult rv = BlockAndWaitForStream();
   NS_ENSURE_SUCCESS(rv, nullptr);
 
   return mStream;
 }
 
-class InputStreamParent final
-  : public PBlobStreamParent
-{
-  typedef mozilla::ipc::InputStreamParams InputStreamParams;
-  typedef mozilla::dom::OptionalFileDescriptorSet OptionalFileDescriptorSet;
-
-  bool* mSyncLoopGuard;
-  InputStreamParams* mParams;
-  OptionalFileDescriptorSet* mFDs;
-
-#ifdef DEBUG
-  PRThread* mOwningThread;
-#endif
-
-public:
-  InputStreamParent()
-    : mSyncLoopGuard(nullptr)
-    , mParams(nullptr)
-    , mFDs(nullptr)
-  {
-#ifdef DEBUG
-    mOwningThread = PR_GetCurrentThread();
-#endif
-
-    AssertIsOnOwningThread();
-
-    MOZ_COUNT_CTOR(InputStreamParent);
-  }
-
-  InputStreamParent(bool* aSyncLoopGuard,
-                    InputStreamParams* aParams,
-                    OptionalFileDescriptorSet* aFDs)
-    : mSyncLoopGuard(aSyncLoopGuard)
-    , mParams(aParams)
-    , mFDs(aFDs)
-  {
-#ifdef DEBUG
-    mOwningThread = PR_GetCurrentThread();
-#endif
-
-    AssertIsOnOwningThread();
-    MOZ_ASSERT(aSyncLoopGuard);
-    MOZ_ASSERT(!*aSyncLoopGuard);
-    MOZ_ASSERT(aParams);
-    MOZ_ASSERT(aFDs);
-
-    MOZ_COUNT_CTOR(InputStreamParent);
-  }
-
-  ~InputStreamParent() override
-  {
-    AssertIsOnOwningThread();
-
-    MOZ_COUNT_DTOR(InputStreamParent);
-  }
-
-  void
-  AssertIsOnOwningThread() const
-  {
-#ifdef DEBUG
-    MOZ_ASSERT(PR_GetCurrentThread() == mOwningThread);
-#endif
-  }
-
-  bool
-  Destroy(const InputStreamParams& aParams,
-          const OptionalFileDescriptorSet& aFDs)
-  {
-    AssertIsOnOwningThread();
-
-    if (mSyncLoopGuard) {
-      MOZ_ASSERT(!*mSyncLoopGuard);
-
-      *mSyncLoopGuard = true;
-      *mParams = aParams;
-      *mFDs = aFDs;
-
-      // We're not a live actor so manage the memory ourselves.
-      delete this;
-      return true;
-    }
-
-    // This will be destroyed by BlobParent::DeallocPBlobStreamParent.
-    return PBlobStreamParent::Send__delete__(this, aParams, aFDs);
-  }
-
-private:
-  // This method is only called by the IPDL message machinery.
-  void
-  ActorDestroy(ActorDestroyReason aWhy) override
-  {
-    // Nothing needs to be done here.
-  }
-};
+} // namespace
+
 StaticAutoPtr<BlobParent::IDTable> BlobParent::sIDTable;
 StaticAutoPtr<Mutex> BlobParent::sIDTableMutex;
 
 /*******************************************************************************
  * BlobParent::IDTableEntry Declaration
  ******************************************************************************/
 
 class BlobParent::IDTableEntry final
rename from dom/file/ipc/BlobChild.h
rename to dom/ipc/BlobChild.h
rename from dom/file/ipc/BlobParent.h
rename to dom/ipc/BlobParent.h
rename from dom/file/ipc/BlobTypes.ipdlh
rename to dom/ipc/BlobTypes.ipdlh
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -5,16 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifdef MOZ_WIDGET_GTK
 #include <gtk/gtk.h>
 #endif
 
 #include "ContentChild.h"
 
+#include "BlobChild.h"
 #include "CrashReporterChild.h"
 #include "GeckoProfiler.h"
 #include "TabChild.h"
 #include "HandlerServiceChild.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
@@ -32,17 +33,16 @@
 #include "mozilla/dom/FlyWebPublishedServerIPC.h"
 #include "mozilla/dom/GetFilesHelper.h"
 #include "mozilla/dom/PCrashReporterChild.h"
 #include "mozilla/dom/ProcessGlobal.h"
 #include "mozilla/dom/PushNotifier.h"
 #include "mozilla/dom/workers/ServiceWorkerManager.h"
 #include "mozilla/dom/nsIContentChild.h"
 #include "mozilla/dom/URLClassifierChild.h"
-#include "mozilla/dom/ipc/BlobChild.h"
 #include "mozilla/gfx/gfxVars.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"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 #include "mozilla/ipc/ProcessChild.h"
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -20,16 +20,17 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #endif
 
 #include "chrome/common/process_watcher.h"
 
 #include "mozilla/a11y/PDocAccessible.h"
 #include "AudioChannelService.h"
+#include "BlobParent.h"
 #include "CrashReporterParent.h"
 #include "DeviceStorageStatics.h"
 #include "GMPServiceParent.h"
 #include "HandlerServiceParent.h"
 #include "IHistory.h"
 #include "imgIContainer.h"
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
 #include "mozilla/a11y/AccessibleWrap.h"
@@ -58,17 +59,16 @@
 #include "mozilla/dom/Permissions.h"
 #include "mozilla/dom/PresentationParent.h"
 #include "mozilla/dom/PPresentationParent.h"
 #include "mozilla/dom/PushNotifier.h"
 #include "mozilla/dom/FlyWebPublishedServerIPC.h"
 #include "mozilla/dom/quota/QuotaManagerService.h"
 #include "mozilla/dom/time/DateCacheCleaner.h"
 #include "mozilla/dom/URLClassifierParent.h"
-#include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/embedding/printingui/PrintingParent.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"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/ipc/PSendStreamParent.h"
rename from dom/file/ipc/PBlob.ipdl
rename to dom/ipc/PBlob.ipdl
rename from dom/file/ipc/PBlobStream.ipdl
rename to dom/ipc/PBlobStream.ipdl
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -14,17 +14,16 @@
 #include "nsAccessibilityService.h"
 #endif
 #include "mozilla/BrowserElementParent.h"
 #include "mozilla/dom/ContentBridgeParent.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/indexedDB/ActorsParent.h"
-#include "mozilla/dom/ipc/BlobParent.h"
 #include "mozilla/plugins/PluginWidgetParent.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/DataSurfaceHelpers.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/Hal.h"
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/ipc/DocumentRendererParent.h"
@@ -36,16 +35,17 @@
 #include "mozilla/MouseEvents.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/PresShell.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/TouchEvents.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/Unused.h"
+#include "BlobParent.h"
 #include "nsCOMPtr.h"
 #include "nsContentAreaDragDrop.h"
 #include "nsContentUtils.h"
 #include "nsDebug.h"
 #include "nsFocusManager.h"
 #include "nsFrameLoader.h"
 #include "nsIBaseWindow.h"
 #include "nsIBrowser.h"
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -6,17 +6,20 @@
 
 XPIDL_SOURCES += [
     'nsIHangReport.idl',
 ]
 
 XPIDL_MODULE = 'dom'
 
 EXPORTS.mozilla.dom.ipc += [
+    'BlobChild.h',
+    'BlobParent.h',
     'IdType.h',
+    'nsIRemoteBlob.h',
     'StructuredCloneData.h',
 ]
 
 EXPORTS.mozilla.dom += [
     'ContentBridgeChild.h',
     'ContentBridgeParent.h',
     'ContentChild.h',
     'ContentParent.h',
@@ -62,27 +65,32 @@ UNIFIED_SOURCES += [
     'TabChild.cpp',
     'TabContext.cpp',
     'TabMessageUtils.cpp',
     'TabParent.cpp',
     'URLClassifierChild.cpp',
     'URLClassifierParent.cpp',
 ]
 
+# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning.
 # CrashReporterChild.cpp cannot be compiled in unified mode because of name clashes
 # in OS X headers.
 # ContentChild.cpp cannot be compiled in unified mode on  linux due to Time conflict
 SOURCES += [
+    'Blob.cpp',
     'ContentChild.cpp',
     'CrashReporterChild.cpp',
     'ProcessHangMonitor.cpp',
 ]
 
 IPDL_SOURCES += [
+    'BlobTypes.ipdlh',
     'DOMTypes.ipdlh',
+    'PBlob.ipdl',
+    'PBlobStream.ipdl',
     'PBrowser.ipdl',
     'PBrowserOrId.ipdlh',
     'PColorPicker.ipdl',
     'PContent.ipdl',
     'PContentBridge.ipdl',
     'PContentPermission.ipdlh',
     'PContentPermissionRequest.ipdl',
     'PCrashReporter.ipdl',
rename from dom/file/ipc/nsIRemoteBlob.h
rename to dom/ipc/nsIRemoteBlob.h
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -43,17 +43,16 @@ DIRS += [
     'browser-element',
     'cache',
     'canvas',
     'crypto',
     'devicestorage',
     'encoding',
     'events',
     'fetch',
-    'file',
     'filehandle',
     'filesystem',
     'flyweb',
     'gamepad',
     'geolocation',
     'grid',
     'html',
     'json',
--- a/dom/xhr/moz.build
+++ b/dom/xhr/moz.build
@@ -24,17 +24,16 @@ UNIFIED_SOURCES += [
     'XMLHttpRequestMainThread.cpp',
     'XMLHttpRequestString.cpp',
     'XMLHttpRequestUpload.cpp',
     'XMLHttpRequestWorker.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/base',
-    '/dom/file',
     '/dom/workers',
     '/netwerk/base',
 ]
 
 MOCHITEST_MANIFESTS += [ 'tests/mochitest.ini' ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/image/ImageCacheKey.cpp
+++ b/image/ImageCacheKey.cpp
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "ImageCacheKey.h"
 
 #include "mozilla/Move.h"
+#include "File.h"
 #include "ImageURL.h"
 #include "nsHostObjectProtocolHandler.h"
 #include "nsString.h"
-#include "mozilla/dom/File.h"
 #include "mozilla/dom/workers/ServiceWorkerManager.h"
 #include "nsIDocument.h"
 #include "nsPrintfCString.h"
 
 namespace mozilla {
 
 using namespace dom;
 
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -113,17 +113,16 @@
 @BINPATH@/components/directory.xpt
 @BINPATH@/components/docshell.xpt
 @BINPATH@/components/dom.xpt
 @BINPATH@/components/dom_base.xpt
 @BINPATH@/components/dom_canvas.xpt
 @BINPATH@/components/dom_core.xpt
 @BINPATH@/components/dom_css.xpt
 @BINPATH@/components/dom_events.xpt
-@BINPATH@/components/dom_file.xpt
 @BINPATH@/components/dom_geolocation.xpt
 @BINPATH@/components/dom_media.xpt
 @BINPATH@/components/dom_network.xpt
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_power.xpt