Backed out 10 changesets (bug 914944, bug 871445) for mochitest failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 11 Sep 2013 11:45:51 -0400
changeset 159481 db83498e31f030c93579d019b628e0b8ce803d62
parent 159480 3d9f3a2e90f4085844108ff59711cc0420cd35d5
child 159482 e0da7141fa0470a444d31b2900516465ec0b8ee6
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs914944, 871445
milestone26.0a1
backs outa840638b5b1828ddb716ca191e2a5605d9c21985
f40c7d5790bd2f7e03a85c29d51985c938e30746
e1b288e29663599e4979415210b08e7d538681f2
6242ddf7b6c7d2078d870625ca2c4d9cd79fe5b5
7679185a8cf33567184fcb0e9b8d651c44852255
639ec7a627f89c9fa287537137418fc8c6ec2933
93b050a79db4b5b18598ddc9be2927becde21d8c
ec3382ceef99f527916f270e95ba0a58af8ddbe2
51c0d52303062436f39440ccee6fc28d244c8f82
76c9069bdb56ce4619e8607fc3e5f596291185a4
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 10 changesets (bug 914944, bug 871445) for mochitest failures on a CLOSED TREE. Backed out changeset a840638b5b18 (bug 914944) Backed out changeset f40c7d5790bd (bug 914944) Backed out changeset e1b288e29663 (bug 871445) Backed out changeset 6242ddf7b6c7 (bug 871445) Backed out changeset 7679185a8cf3 (bug 871445) Backed out changeset 639ec7a627f8 (bug 871445) Backed out changeset 93b050a79db4 (bug 871445) Backed out changeset ec3382ceef99 (bug 871445) Backed out changeset 51c0d5230306 (bug 871445) Backed out changeset 76c9069bdb56 (bug 871445)
CLOBBER
b2g/app/b2g.js
b2g/chrome/content/shell.js
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
dom/apps/src/Webapps.jsm
dom/base/IndexedDBHelper.jsm
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/bindings/Bindings.conf
dom/datastore/DataStore.jsm
dom/datastore/DataStore.manifest
dom/datastore/DataStoreChangeNotifier.jsm
dom/datastore/DataStoreDB.jsm
dom/datastore/DataStoreService.js
dom/datastore/moz.build
dom/datastore/nsIDataStoreService.idl
dom/datastore/tests/Makefile.in
dom/datastore/tests/file_app.sjs
dom/datastore/tests/file_app.template.webapp
dom/datastore/tests/file_app2.template.webapp
dom/datastore/tests/file_app_install.html
dom/datastore/tests/file_arrays.html
dom/datastore/tests/file_basic.html
dom/datastore/tests/file_changes.html
dom/datastore/tests/file_changes2.html
dom/datastore/tests/file_readonly.html
dom/datastore/tests/file_revision.html
dom/datastore/tests/moz.build
dom/datastore/tests/test_app_install.html
dom/datastore/tests/test_arrays.html
dom/datastore/tests/test_basic.html
dom/datastore/tests/test_changes.html
dom/datastore/tests/test_readonly.html
dom/datastore/tests/test_revision.html
dom/moz.build
dom/power/PowerManager.cpp
dom/power/PowerManager.h
dom/power/WakeLock.cpp
dom/power/moz.build
dom/webidl/DataStore.webidl
dom/webidl/DataStoreChangeEvent.webidl
dom/webidl/Navigator.webidl
dom/webidl/moz.build
mobile/android/installer/package-manifest.in
modules/libpref/src/init/all.js
widget/gonk/libui/InputDispatcher.cpp
--- a/CLOBBER
+++ b/CLOBBER
@@ -13,9 +13,9 @@
 #          |               |
 #          O <-- Clobber   O  <-- Clobber
 #
 # Note: The description below will be part of the error message shown to users.
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
-Bug 785884 - Implement support for temporary storage (aka shared pool)
+Bug 785884 - Implement support for temporary storage (aka shared pool) 
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -742,19 +742,16 @@ pref("captivedetect.canonicalContent", "
 pref("ping.manifestURL", "https://marketplace.firefox.com/packaged.webapp");
 
 // Enable the disk space watcher
 pref("disk_space_watcher.enabled", true);
 
 // Enable promise
 pref("dom.promise.enabled", false);
 
-// Enable dataStore
-pref("dom.datastore.enabled", false);
-
 // Allow ADB to run for this many hours before disabling
 // (only applies when marionette is disabled)
 // 0 disables the timer.
 pref("b2g.adb.timeout-hours", 12);
 
 // Absolute path to the devtool unix domain socket file used
 // to communicate with a usb cable via adb forward
 pref("devtools.debugger.unix-domain-socket", "/data/local/debugger-socket");
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -1,17 +1,16 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
 /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
 /* 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/. */
 
 Cu.import('resource://gre/modules/ContactService.jsm');
 Cu.import('resource://gre/modules/SettingsChangeNotifier.jsm');
-Cu.import('resource://gre/modules/DataStoreChangeNotifier.jsm');
 Cu.import('resource://gre/modules/AlarmService.jsm');
 Cu.import('resource://gre/modules/ActivitiesService.jsm');
 Cu.import('resource://gre/modules/PermissionPromptHelper.jsm');
 Cu.import('resource://gre/modules/ObjectWrapper.jsm');
 Cu.import('resource://gre/modules/accessibility/AccessFu.jsm');
 Cu.import('resource://gre/modules/Payment.jsm');
 Cu.import("resource://gre/modules/AppsUtils.jsm");
 Cu.import('resource://gre/modules/UserAgentOverrides.jsm');
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -742,20 +742,16 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DL
 @BINPATH@/components/YoutubeProtocolHandler.js
 @BINPATH@/components/RecoveryService.js
 @BINPATH@/components/MailtoProtocolHandler.js
 @BINPATH@/components/SmsProtocolHandler.js
 @BINPATH@/components/TelProtocolHandler.js
 @BINPATH@/components/B2GAboutRedirector.js
 @BINPATH@/components/FilePicker.js
 
-@BINPATH@/components/DataStore.manifest
-@BINPATH@/components/DataStoreService.js
-@BINPATH@/components/dom_datastore.xpt
-
 #ifdef MOZ_WEBSPEECH
 @BINPATH@/components/dom_webspeechsynth.xpt
 #endif
 
 #ifdef XP_MACOSX
 @BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
 #endif
 
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -789,13 +789,8 @@ bin/libfreebl_32int64_3.so
 @BINPATH@/metro/chrome/@AB_CD@@JAREXT@
 @BINPATH@/metro/chrome/@AB_CD@.manifest
 @BINPATH@/metro/chrome/pdfjs.manifest
 @BINPATH@/metro/chrome/pdfjs/*
 @BINPATH@/metro/components
 @BINPATH@/metro/defaults
 @BINPATH@/metro/modules
 #endif
-
-@BINPATH@/components/DataStore.manifest
-@BINPATH@/components/DataStoreService.js
-@BINPATH@/components/dom_datastore.xpt
-
--- a/dom/apps/src/Webapps.jsm
+++ b/dom/apps/src/Webapps.jsm
@@ -55,20 +55,16 @@ XPCOMUtils.defineLazyGetter(this, "NetUt
 XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
                                    "@mozilla.org/parentprocessmessagemanager;1",
                                    "nsIMessageBroadcaster");
 
 XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
                                    "@mozilla.org/childprocessmessagemanager;1",
                                    "nsIMessageSender");
 
-XPCOMUtils.defineLazyServiceGetter(this, "dataStoreService",
-                                   "@mozilla.org/datastore-service;1",
-                                   "nsIDataStoreService");
-
 XPCOMUtils.defineLazyGetter(this, "msgmgr", function() {
   return Cc["@mozilla.org/system-message-internal;1"]
          .getService(Ci.nsISystemMessagesInternal);
 });
 
 XPCOMUtils.defineLazyGetter(this, "updateSvc", function() {
   return Cc["@mozilla.org/offlinecacheupdate-service;1"]
            .getService(Ci.nsIOfflineCacheUpdateService);
@@ -259,29 +255,16 @@ this.DOMApplicationRegistry = {
         }, this);
       }).bind(this));
 
       // Nothing else to do but notifying we're ready.
       this.notifyAppsRegistryReady();
     }
   },
 
-  updateDataStoreForApp: function(aId) {
-    if (!this.webapps[aId]) {
-      return;
-    }
-
-    // Create or Update the DataStore for this app
-    this._readManifests([{ id: aId }], (function(aResult) {
-      this.updateDataStore(this.webapps[aId].localId,
-                           this.webapps[aId].manifestURL,
-                           aResult[0]);
-    }).bind(this));
-  },
-
   updatePermissionsForApp: function updatePermissionsForApp(aId) {
     if (!this.webapps[aId]) {
       return;
     }
 
     // Install the permissions for this app, as if we were updating
     // to cleanup the old ones if needed.
     // TODO It's not clear what this should do when there are multiple profiles.
@@ -513,17 +496,16 @@ this.DOMApplicationRegistry = {
         // At first run, install preloaded apps and set up their permissions.
         for (let id in this.webapps) {
           this.installPreinstalledApp(id);
           if (!this.webapps[id]) {
             continue;
           }
           this.updateOfflineCacheForApp(id);
           this.updatePermissionsForApp(id);
-          this.updateDataStoreForApp(id);
         }
         // Need to update the persisted list of apps since
         // installPreinstalledApp() removes the ones failing to install.
         this._saveApps();
       }
       this.registerAppsHandlers(runUpdate);
     }).bind(this);
 
@@ -535,40 +517,16 @@ this.DOMApplicationRegistry = {
       else
         onAppsLoaded();
 #else
       onAppsLoaded();
 #endif
     }).bind(this));
   },
 
-  updateDataStore: function(aId, aManifestURL, aManifest) {
-    if ('datastores-owned' in aManifest) {
-      for (let name in aManifest['datastores-owned']) {
-        let readonly = "access" in aManifest['datastores-owned'][name]
-                         ? aManifest['datastores-owned'][name].access == 'readonly'
-                         : false;
-
-        dataStoreService.installDataStore(aId, name, aManifestURL, readonly);
-      }
-    }
-
-    if ('datastores-access' in aManifest) {
-      for (let name in aManifest['datastores-access']) {
-        let readonly = ("readonly" in aManifest['datastores-access'][name]) &&
-                       !aManifest['datastores-access'][name].readonly
-                         ? false : true;
-
-        // The first release is always in readonly mode.
-        dataStoreService.installAccessDataStore(aId, name, aManifestURL,
-                                                /* readonly */ true);
-      }
-    }
-  },
-
   // |aEntryPoint| is either the entry_point name or the null in which case we
   // use the root of the manifest.
   _registerSystemMessagesForEntryPoint: function(aManifest, aApp, aEntryPoint) {
     let root = aManifest;
     if (aEntryPoint && aManifest.entry_points[aEntryPoint]) {
       root = aManifest.entry_points[aEntryPoint];
     }
 
@@ -1308,17 +1266,17 @@ this.DOMApplicationRegistry = {
           this.updateAppHandlers(aOldManifest, aData, app);
           if (supportUseCurrentProfile()) {
             PermissionsInstaller.installPermissions(
               { manifest: aData,
                 origin: app.origin,
                 manifestURL: app.manifestURL },
               true);
           }
-          this.updateDataStore(this.webapps[id].localId, app.manifestURL, aData);
+
           this.broadcastMessage("Webapps:PackageEvent",
                                 { type: "applied",
                                   manifestURL: app.manifestURL,
                                   app: app,
                                   manifest: aData });
         }).bind(this));
       }).bind(this));
     }).bind(this));
@@ -1512,18 +1470,16 @@ this.DOMApplicationRegistry = {
           // Update the permissions for this app.
           PermissionsInstaller.installPermissions({
             manifest: app.manifest,
             origin: app.origin,
             manifestURL: aData.manifestURL
           }, true);
         }
 
-        this.updateDataStore(this.webapps[id].localId, app.manifestURL, app.manifest);
-
         app.name = manifest.name;
         app.csp = manifest.csp || "";
         app.updateTime = Date.now();
       } else {
         manifest = new ManifestHelper(aOldManifest, app.origin);
       }
 
       // Update the registry.
@@ -2012,20 +1968,16 @@ this.DOMApplicationRegistry = {
 
           if (supportUseCurrentProfile()) {
             // Update the permissions for this app.
             PermissionsInstaller.installPermissions({ manifest: aManifest,
                                                       origin: appObject.origin,
                                                       manifestURL: appObject.manifestURL },
                                                     true);
           }
-
-          this.updateDataStore(this.webapps[aId].localId, appObject.manifestURL,
-                               aManifest);
-
           debug("About to fire Webapps:PackageEvent 'installed'");
           this.broadcastMessage("Webapps:PackageEvent",
                                 { type: "installed",
                                   manifestURL: appObject.manifestURL,
                                   app: app,
                                   manifest: aManifest });
           if (installSuccessCallback) {
             installSuccessCallback(aManifest);
@@ -2117,19 +2069,16 @@ this.DOMApplicationRegistry = {
       if (supportUseCurrentProfile()) {
         PermissionsInstaller.installPermissions({ origin: appObject.origin,
                                                   manifestURL: appObject.manifestURL,
                                                   manifest: jsonManifest },
                                                 isReinstall, (function() {
           this.uninstall(aData, aData.mm);
         }).bind(this));
       }
-
-      this.updateDataStore(this.webapps[id].localId, this.webapps[id].manifestURL,
-                           jsonManifest);
     }
 
     ["installState", "downloadAvailable",
      "downloading", "downloadSize", "readyToApplyDownload"].forEach(function(aProp) {
       aData.app[aProp] = appObject[aProp];
      });
 
     if (manifest.appcache_path) {
--- a/dom/base/IndexedDBHelper.jsm
+++ b/dom/base/IndexedDBHelper.jsm
@@ -107,27 +107,19 @@ IndexedDBHelper.prototype = {
    *        Success callback to call on a successful transaction commit.
    *        The result is stored in txn.result.
    * @param failureCb
    *        Error callback to call when an error is encountered.
    */
   newTxn: function newTxn(txn_type, store_name, callback, successCb, failureCb) {
     this.ensureDB(function () {
       if (DEBUG) debug("Starting new transaction" + txn_type);
-      let txn = this._db.transaction(Array.isArray(store_name) ? store_name : this.dbStoreNames, txn_type);
+      let txn = this._db.transaction(this.dbStoreNames, txn_type);
       if (DEBUG) debug("Retrieving object store", this.dbName);
-      let stores;
-      if (Array.isArray(store_name)) {
-        stores = [];
-        for (let i = 0; i < store_name.length; ++i) {
-          stores.push(txn.objectStore(store_name[i]));
-        }
-      } else {
-        stores = txn.objectStore(store_name);
-      }
+      let store = txn.objectStore(store_name);
 
       txn.oncomplete = function (event) {
         if (DEBUG) debug("Transaction complete. Returning to callback.");
         if (successCb) {
           successCb(txn.result);
         }
       };
 
@@ -140,17 +132,17 @@ IndexedDBHelper.prototype = {
         if (failureCb) {
           if (event.target.error) {
             failureCb(event.target.error.name);
           } else {
             failureCb("UnknownError");
           }
         }
       };
-      callback(txn, stores);
+      callback(txn, store);
     }.bind(this), failureCb);
   },
 
   /**
    * Initialize the DB. Does not call open.
    *
    * @param aDBName
    *        DB name for the open call.
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -20,17 +20,17 @@
 #include "nsICookiePermission.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsContentUtils.h"
 #include "nsUnicharUtils.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
 #include "BatteryManager.h"
-#include "mozilla/dom/PowerManager.h"
+#include "PowerManager.h"
 #include "nsIDOMWakeLock.h"
 #include "nsIPowerManagerService.h"
 #include "mozilla/dom/MobileMessageManager.h"
 #include "mozilla/Hal.h"
 #include "nsISiteSpecificUserAgent.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/StaticPtr.h"
 #include "Connection.h"
@@ -65,23 +65,23 @@
 #include "AudioChannelManager.h"
 #endif
 
 #ifdef MOZ_B2G_FM
 #include "mozilla/dom/FMRadio.h"
 #endif
 
 #include "nsIDOMGlobalPropertyInitializer.h"
-#include "nsIDataStoreService.h"
 #include "nsJSUtils.h"
 
 #include "nsScriptNameSpaceManager.h"
 
 #include "mozilla/dom/NavigatorBinding.h"
-#include "mozilla/dom/Promise.h"
+
+using namespace mozilla::dom::power;
 
 // This should not be in the namespace.
 DOMCI_DATA(Navigator, mozilla::dom::Navigator)
 
 namespace mozilla {
 namespace dom {
 
 static bool sDoNotTrackEnabled = false;
@@ -1095,39 +1095,17 @@ Navigator::GetBattery(ErrorResult& aRv)
 
     mBatteryManager = new battery::BatteryManager();
     mBatteryManager->Init(mWindow);
   }
 
   return mBatteryManager;
 }
 
-already_AddRefed<Promise>
-Navigator::GetDataStores(const nsAString& aName, ErrorResult& aRv)
-{
-  if (!mWindow || !mWindow->GetDocShell()) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return nullptr;
-  }
-
-  nsCOMPtr<nsIDataStoreService> service =
-    do_GetService("@mozilla.org/datastore-service;1");
-  if (!service) {
-    aRv.Throw(NS_ERROR_FAILURE);
-    return nullptr;
-  }
-
-  nsCOMPtr<nsISupports> promise;
-  aRv = service->GetDataStores(mWindow, aName, getter_AddRefs(promise));
-
-  nsRefPtr<Promise> p = static_cast<Promise*>(promise.get());
-  return p.forget();
-}
-
-PowerManager*
+power::PowerManager*
 Navigator::GetMozPower(ErrorResult& aRv)
 {
   if (!mPowerManager) {
     if (!mWindow) {
       aRv.Throw(NS_ERROR_UNEXPECTED);
       return nullptr;
     }
     mPowerManager = PowerManager::CreateInstance(mWindow);
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -50,18 +50,16 @@ namespace dom {
 namespace battery {
 class BatteryManager;
 } // namespace battery
 
 #ifdef MOZ_B2G_FM
 class FMRadio;
 #endif
 
-class Promise;
-
 class DesktopNotificationCenter;
 class MobileMessageManager;
 class MozIdleObserver;
 #ifdef MOZ_GAMEPAD
 class Gamepad;
 #endif // MOZ_GAMEPAD
 #ifdef MOZ_MEDIA_NAVIGATOR
 class MozDOMGetUserMediaSuccessCallback;
@@ -94,17 +92,19 @@ namespace bluetooth {
 class BluetoothManager;
 } // namespace bluetooth
 #endif // MOZ_B2G_BT
 
 #ifdef MOZ_B2G_RIL
 class Voicemail;
 #endif
 
+namespace power {
 class PowerManager;
+} // namespace power
 
 namespace time {
 class TimeManager;
 } // namespace time
 
 namespace system {
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
 class AudioChannelManager;
@@ -176,18 +176,16 @@ public:
                                const nsAString& aTitle, ErrorResult& aRv);
   void RegisterContentHandler(const nsAString& aMIMEType, const nsAString& aURL,
                               const nsAString& aTitle, ErrorResult& aRv);
   nsMimeTypeArray* GetMimeTypes(ErrorResult& aRv);
   nsPluginArray* GetPlugins(ErrorResult& aRv);
   // The XPCOM GetDoNotTrack is ok
   Geolocation* GetGeolocation(ErrorResult& aRv);
   battery::BatteryManager* GetBattery(ErrorResult& aRv);
-  already_AddRefed<Promise> GetDataStores(const nsAString &aName,
-                                          ErrorResult& aRv);
   void Vibrate(uint32_t aDuration, ErrorResult& aRv);
   void Vibrate(const nsTArray<uint32_t>& aDuration, ErrorResult& aRv);
   void GetAppCodeName(nsString& aAppCodeName, ErrorResult& aRv)
   {
     aRv = GetAppCodeName(aAppCodeName);
   }
   void GetOscpu(nsString& aOscpu, ErrorResult& aRv)
   {
@@ -196,17 +194,17 @@ public:
   // The XPCOM GetVendor is OK
   // The XPCOM GetVendorSub is OK
   // The XPCOM GetProductSub is OK
   bool CookieEnabled();
   void GetBuildID(nsString& aBuildID, ErrorResult& aRv)
   {
     aRv = GetBuildID(aBuildID);
   }
-  PowerManager* GetMozPower(ErrorResult& aRv);
+  power::PowerManager* GetMozPower(ErrorResult& aRv);
   bool JavaEnabled(ErrorResult& aRv);
   bool TaintEnabled()
   {
     return false;
   }
   void AddIdleObserver(MozIdleObserver& aObserver, ErrorResult& aRv);
   void RemoveIdleObserver(MozIdleObserver& aObserver, ErrorResult& aRv);
   already_AddRefed<nsIDOMMozWakeLock> RequestWakeLock(const nsAString &aTopic,
@@ -324,17 +322,17 @@ private:
   nsRefPtr<nsMimeTypeArray> mMimeTypes;
   nsRefPtr<nsPluginArray> mPlugins;
   nsRefPtr<Geolocation> mGeolocation;
   nsRefPtr<DesktopNotificationCenter> mNotification;
   nsRefPtr<battery::BatteryManager> mBatteryManager;
 #ifdef MOZ_B2G_FM
   nsRefPtr<FMRadio> mFMRadio;
 #endif
-  nsRefPtr<PowerManager> mPowerManager;
+  nsRefPtr<power::PowerManager> mPowerManager;
   nsRefPtr<MobileMessageManager> mMobileMessageManager;
 #ifdef MOZ_B2G_RIL
   nsRefPtr<telephony::Telephony> mTelephony;
   nsRefPtr<Voicemail> mVoicemail;
 #endif
   nsRefPtr<network::Connection> mConnection;
 #ifdef MOZ_B2G_RIL
   nsRefPtr<network::MobileConnection> mMobileConnection;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -772,17 +772,17 @@ DOMInterfaces = {
     'nativeType': 'mozilla::dom::CellBroadcast',
 },
 
 'MozNamedAttrMap': {
     'nativeType': 'nsDOMAttributeMap',
 },
 
 'MozPowerManager': {
-    'nativeType': 'mozilla::dom::PowerManager',
+    'nativeType': 'mozilla::dom::power::PowerManager',
 },
 
 'MozStkCommandEvent' : {
     'nativeType': 'mozilla::dom::icc::StkCommandEvent',
     'headerFile': 'StkCommandEvent.h',
 },
 
 'MozTimeManager': {
deleted file mode 100644
--- a/dom/datastore/DataStore.jsm
+++ /dev/null
@@ -1,598 +0,0 @@
-/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
-/* vim: set ft=javascript ts=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/. */
-
-'use strict'
-
-this.EXPORTED_SYMBOLS = ["DataStore", "DataStoreAccess"];
-
-function debug(s) {
-  // dump('DEBUG DataStore: ' + s + '\n');
-}
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-const REVISION_ADDED = "added";
-const REVISION_UPDATED = "updated";
-const REVISION_REMOVED = "removed";
-const REVISION_VOID = "void";
-
-// This value has to be tuned a bit. Currently it's just a guess
-// and yet we don't know if it's too low or too high.
-const MAX_REQUESTS = 25;
-
-Cu.import("resource://gre/modules/DataStoreDB.jsm");
-Cu.import("resource://gre/modules/ObjectWrapper.jsm");
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-
-XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
-                                   "@mozilla.org/childprocessmessagemanager;1",
-                                   "nsIMessageSender");
-
-/* Helper functions */
-function createDOMError(aWindow, aEvent) {
-  return new aWindow.DOMError(aEvent.target.error.name);
-}
-
-function throwInvalidArg(aWindow) {
-  return aWindow.Promise.reject(
-    new aWindow.DOMError("SyntaxError", "Non-numeric or invalid id"));
-}
-
-function throwReadOnly(aWindow) {
-  return aWindow.Promise.reject(
-    new aWindow.DOMError("ReadOnlyError", "DataStore in readonly mode"));
-}
-
-function parseIds(aId) {
-  function parseId(aId) {
-    return (isNaN(aId) || aId <= 0) ? null : aId;
-  }
-
-  if (!Array.isArray(aId)) {
-    return parseId(aId);
-  }
-
-  for (let i = 0; i < aId.length; ++i) {
-    aId[i] = parseId(aId[i]);
-    if (aId[i] === null) {
-      return null;
-    }
-  }
-
-  return aId;
-}
-
-/* Exposed DataStore object */
-function ExposedDataStore(aWindow, aDataStore, aReadOnly) {
-  debug("ExposedDataStore created");
-  this.init(aWindow, aDataStore, aReadOnly);
-}
-
-ExposedDataStore.prototype = {
-  classDescription: "DataStore XPCOM Component",
-  classID: Components.ID("{db5c9602-030f-4bff-a3de-881a8de370f2}"),
-  contractID: "@mozilla.org/dom/datastore;1",
-  QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsISupports]),
-
-  callbacks: [],
-
-  init: function(aWindow, aDataStore, aReadOnly) {
-    debug("ExposedDataStore init");
-
-    this.window = aWindow;
-    this.dataStore = aDataStore;
-    this.isReadOnly = aReadOnly;
-  },
-
-  receiveMessage: function(aMessage) {
-    debug("receiveMessage");
-
-    if (aMessage.name != "DataStore:Changed:Return:OK") {
-      debug("Wrong message: " + aMessage.name);
-      return;
-    }
-
-    let self = this;
-
-    this.dataStore.retrieveRevisionId(
-      function() {
-        let event = new self.window.DataStoreChangeEvent('change', aMessage.data);
-        self.__DOM_IMPL__.dispatchEvent(event);
-      },
-      // Forcing the reading of the revisionId
-      true
-    );
-  },
-
-  // Public interface :
-
-  get name() {
-    return this.dataStore.name;
-  },
-
-  get owner() {
-    return this.dataStore.owner;
-  },
-
-  get readOnly() {
-    return this.isReadOnly;
-  },
-
-  get: function(aId) {
-    aId = parseIds(aId);
-    if (aId === null) {
-      return throwInvalidArg(this.window);
-    }
-
-    let self = this;
-
-    // Promise<Object>
-    return this.dataStore.newDBPromise(this.window, "readonly",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.getInternal(self.window, aStore,
-                                   Array.isArray(aId) ?  aId : [ aId ],
-                                   function(aResults) {
-          aResolver.resolve(Array.isArray(aId) ? aResults : aResults[0]);
-        });
-      }
-    );
-  },
-
-  update: function(aId, aObj) {
-    aId = parseInt(aId);
-    if (isNaN(aId) || aId <= 0) {
-      return throwInvalidArg(this.window);
-    }
-
-    if (this.isReadOnly) {
-      return throwReadOnly(this.window);
-    }
-
-    let self = this;
-
-    // Promise<void>
-    return this.dataStore.newDBPromise(this.window, "readwrite",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.updateInternal(self.window, aResolver, aStore, aRevisionStore, aId, aObj);
-      }
-    );
-  },
-
-  add: function(aObj) {
-    if (this.isReadOnly) {
-      return throwReadOnly(this.window);
-    }
-
-    let self = this;
-
-    // Promise<int>
-    return this.dataStore.newDBPromise(this.window, "readwrite",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.addInternal(self.window, aResolver, aStore, aRevisionStore, aObj);
-      }
-    );
-  },
-
-  remove: function(aId) {
-    aId = parseInt(aId);
-    if (isNaN(aId) || aId <= 0) {
-      return throwInvalidArg(this.window);
-    }
-
-    if (this.isReadOnly) {
-      return throwReadOnly(this.window);
-    }
-
-    let self = this;
-
-    // Promise<void>
-    return this.dataStore.newDBPromise(this.window, "readwrite",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.removeInternal(aResolver, aStore, aRevisionStore, aId);
-      }
-    );
-  },
-
-  clear: function() {
-    if (this.isReadOnly) {
-      return throwReadOnly(this.window);
-    }
-
-    let self = this;
-
-    // Promise<void>
-    return this.dataStore.newDBPromise(this.window, "readwrite",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.clearInternal(self.window, aResolver, aStore, aRevisionStore);
-      }
-    );
-  },
-
-  get revisionId() {
-    return this.dataStore.revisionId;
-  },
-
-  getChanges: function(aRevisionId) {
-    debug("GetChanges: " + aRevisionId);
-
-    if (aRevisionId === null || aRevisionId === undefined) {
-      return this.window.Promise.reject(
-        new this.window.DOMError("SyntaxError", "Invalid revisionId"));
-    }
-
-    let self = this;
-
-    // Promise<DataStoreChanges>
-    return new this.window.Promise(function(aResolver) {
-      debug("GetChanges promise started");
-      self.dataStore.db.revisionTxn(
-        'readonly',
-        function(aTxn, aStore) {
-          debug("GetChanges transaction success");
-
-          let request = self.dataStore.db.getInternalRevisionId(
-            aRevisionId,
-            aStore,
-            function(aInternalRevisionId) {
-              if (aInternalRevisionId == undefined) {
-                aResolver.resolve(undefined);
-                return;
-              }
-
-              // This object is the return value of this promise.
-              // Initially we use maps, and then we convert them in array.
-              let changes = {
-                revisionId: '',
-                addedIds: {},
-                updatedIds: {},
-                removedIds: {}
-              };
-
-              let request = aStore.mozGetAll(self.window.IDBKeyRange.lowerBound(aInternalRevisionId, true));
-              request.onsuccess = function(aEvent) {
-                for (let i = 0; i < aEvent.target.result.length; ++i) {
-                  let data = aEvent.target.result[i];
-
-                  switch (data.operation) {
-                    case REVISION_ADDED:
-                      changes.addedIds[data.objectId] = true;
-                      break;
-
-                    case REVISION_UPDATED:
-                      // We don't consider an update if this object has been added
-                      // or if it has been already modified by a previous
-                      // operation.
-                      if (!(data.objectId in changes.addedIds) &&
-                          !(data.objectId in changes.updatedIds)) {
-                        changes.updatedIds[data.objectId] = true;
-                      }
-                      break;
-
-                    case REVISION_REMOVED:
-                      let id = data.objectId;
-
-                      // If the object has been added in this range of revisions
-                      // we can ignore it and remove it from the list.
-                      if (id in changes.addedIds) {
-                        delete changes.addedIds[id];
-                      } else {
-                        changes.removedIds[id] = true;
-                      }
-
-                      if (id in changes.updatedIds) {
-                        delete changes.updatedIds[id];
-                      }
-                      break;
-                  }
-                }
-
-                // The last revisionId.
-                if (aEvent.target.result.length) {
-                  changes.revisionId = aEvent.target.result[aEvent.target.result.length - 1].revisionId;
-                }
-
-                // From maps to arrays.
-                changes.addedIds = Object.keys(changes.addedIds).map(function(aKey) { return parseInt(aKey, 10); });
-                changes.updatedIds = Object.keys(changes.updatedIds).map(function(aKey) { return parseInt(aKey, 10); });
-                changes.removedIds = Object.keys(changes.removedIds).map(function(aKey) { return parseInt(aKey, 10); });
-
-                let wrappedObject = ObjectWrapper.wrap(changes, self.window);
-                aResolver.resolve(wrappedObject);
-              };
-            }
-          );
-        },
-        function(aEvent) {
-          debug("GetChanges transaction failed");
-          aResolver.reject(createDOMError(self.window, aEvent));
-        }
-      );
-    });
-  },
-
-  getLength: function() {
-    let self = this;
-
-    // Promise<int>
-    return this.dataStore.newDBPromise(this.window, "readonly",
-      function(aResolver, aTxn, aStore, aRevisionStore) {
-        self.dataStore.getLengthInternal(aResolver, aStore);
-      }
-    );
-  },
-
-  set onchange(aCallback) {
-    debug("Set OnChange");
-    this.__DOM_IMPL__.setEventHandler("onchange", aCallback);
-  },
-
-  get onchange() {
-    debug("Get OnChange");
-    return this.__DOM_IMPL__.getEventHandler("onchange");
-  }
-};
-
-/* DataStore object */
-
-function DataStore(aAppId, aName, aOwner, aReadOnly, aGlobalScope) {
-  this.appId = aAppId;
-  this.name = aName;
-  this.owner = aOwner;
-  this.readOnly = aReadOnly;
-
-  this.db = new DataStoreDB();
-  this.db.init(aOwner, aName, aGlobalScope);
-}
-
-DataStore.prototype = {
-  appId: null,
-  name: null,
-  owner: null,
-  readOnly: null,
-  revisionId: null,
-
-  newDBPromise: function(aWindow, aTxnType, aFunction) {
-    let db = this.db;
-    return new aWindow.Promise(function(aResolver) {
-      debug("DBPromise started");
-      db.txn(
-        aTxnType,
-        function(aTxn, aStore, aRevisionStore) {
-          debug("DBPromise success");
-          aFunction(aResolver, aTxn, aStore, aRevisionStore);
-        },
-        function(aEvent) {
-          debug("DBPromise error");
-          aResolver.reject(createDOMError(aWindow, aEvent));
-        }
-      );
-    });
-  },
-
-  getInternal: function(aWindow, aStore, aIds, aCallback) {
-    debug("GetInternal: " + aIds.toSource());
-
-    // Creation of the results array.
-    let results = new Array(aIds.length);
-
-    // We're going to create this amount of requests.
-    let pendingIds = aIds.length;
-    let indexPos = 0;
-
-    function getInternalSuccess(aEvent, aPos) {
-      debug("GetInternal success. Record: " + aEvent.target.result);
-      results[aPos] = aEvent.target.result;
-      if (!--pendingIds) {
-        aCallback(results);
-        return;
-      }
-
-      if (indexPos < aIds.length) {
-        // Just MAX_REQUESTS requests at the same time.
-        let count = 0;
-        while (indexPos < aIds.length && ++count < MAX_REQUESTS) {
-          getInternalRequest();
-        }
-      }
-    }
-
-    function getInternalRequest() {
-      let currentPos = indexPos++;
-      let request = aStore.get(aIds[currentPos]);
-      request.onsuccess = function(aEvent) {
-        getInternalSuccess(aEvent, currentPos);
-      }
-    }
-
-    getInternalRequest();
-  },
-
-  updateInternal: function(aWindow, aResolver, aStore, aRevisionStore, aId, aObj) {
-    debug("UpdateInternal " + aId);
-
-    let self = this;
-    let request = aStore.put(aObj, aId);
-    request.onsuccess = function(aEvent) {
-      debug("UpdateInternal success");
-
-      self.addRevision(aRevisionStore, aId, REVISION_UPDATED,
-        function() {
-          debug("UpdateInternal - revisionId increased");
-          // No wrap here because the result is always a int.
-          aResolver.resolve(aEvent.target.result);
-        }
-      );
-    };
-  },
-
-  addInternal: function(aWindow, aResolver, aStore, aRevisionStore, aObj) {
-    debug("AddInternal");
-
-    let self = this;
-    let request = aStore.put(aObj);
-    request.onsuccess = function(aEvent) {
-      debug("Request successful. Id: " + aEvent.target.result);
-      self.addRevision(aRevisionStore, aEvent.target.result, REVISION_ADDED,
-        function() {
-          debug("AddInternal - revisionId increased");
-          // No wrap here because the result is always a int.
-          aResolver.resolve(aEvent.target.result);
-        }
-      );
-    };
-  },
-
-  removeInternal: function(aResolver, aStore, aRevisionStore, aId) {
-    debug("RemoveInternal");
-
-    let self = this;
-    let request = aStore.get(aId);
-    request.onsuccess = function(aEvent) {
-      debug("RemoveInternal success. Record: " + aEvent.target.result);
-      if (aEvent.target.result === undefined) {
-        aResolver.resolve(false);
-        return;
-      }
-
-      let deleteRequest = aStore.delete(aId);
-      deleteRequest.onsuccess = function() {
-        debug("RemoveInternal success");
-        self.addRevision(aRevisionStore, aId, REVISION_REMOVED,
-          function() {
-            aResolver.resolve(true);
-          }
-        );
-      };
-    };
-  },
-
-  clearInternal: function(aWindow, aResolver, aStore, aRevisionStore) {
-    debug("ClearInternal");
-
-    let self = this;
-    let request = aStore.clear();
-    request.onsuccess = function() {
-      debug("ClearInternal success");
-      self.db.clearRevisions(aRevisionStore,
-        function() {
-          debug("Revisions cleared");
-
-          self.addRevision(aRevisionStore, 0, REVISION_VOID,
-            function() {
-              debug("ClearInternal - revisionId increased");
-              aResolver.resolve();
-            }
-          );
-        }
-      );
-    };
-  },
-
-  getLengthInternal: function(aResolver, aStore) {
-    debug("GetLengthInternal");
-
-    let request = aStore.count();
-    request.onsuccess = function(aEvent) {
-      debug("GetLengthInternal success: " + aEvent.target.result);
-      // No wrap here because the result is always a int.
-      aResolver.resolve(aEvent.target.result);
-    };
-  },
-
-  addRevision: function(aRevisionStore, aId, aType, aSuccessCb) {
-    let self = this;
-    this.db.addRevision(aRevisionStore, aId, aType,
-      function(aRevisionId) {
-        self.revisionId = aRevisionId;
-        self.sendNotification(aId, aType, aRevisionId);
-        aSuccessCb();
-      }
-    );
-  },
-
-  retrieveRevisionId: function(aSuccessCb, aForced) {
-    if (this.revisionId != null && !aForced) {
-      aSuccessCb();
-      return;
-    }
-
-    let self = this;
-    this.db.revisionTxn(
-      'readwrite',
-      function(aTxn, aRevisionStore) {
-        debug("RetrieveRevisionId transaction success");
-
-        let request = aRevisionStore.openCursor(null, 'prev');
-        request.onsuccess = function(aEvent) {
-          let cursor = aEvent.target.result;
-          if (!cursor) {
-            // If the revision doesn't exist, let's create the first one.
-            self.addRevision(aRevisionStore, 0, REVISION_VOID,
-              function(aRevisionId) {
-                self.revisionId = aRevisionId;
-                aSuccessCb();
-              }
-            );
-            return;
-          }
-
-          self.revisionId = cursor.value.revisionId;
-          aSuccessCb();
-        };
-      }
-    );
-  },
-
-  exposeObject: function(aWindow, aReadOnly) {
-    debug("Exposing Object");
-
-    let exposedObject = new ExposedDataStore(aWindow, this, aReadOnly);
-    let object = aWindow.DataStore._create(aWindow, exposedObject);
-
-    Services.obs.addObserver(function(aSubject, aTopic, aData) {
-      let wId = aSubject.QueryInterface(Ci.nsISupportsPRUint64).data;
-      if (wId == exposedObject.innerWindowID) {
-        cpmm.removeMessageListener("DataStore:Changed:Return:OK", exposedObject);
-      }
-    }, "inner-window-destroyed", false);
-
-    let util = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                      .getInterface(Ci.nsIDOMWindowUtils);
-    exposedObject.innerWindowID = util.currentInnerWindowID;
-
-    cpmm.addMessageListener("DataStore:Changed:Return:OK", exposedObject);
-    cpmm.sendAsyncMessage("DataStore:RegisterForMessages",
-                          { store: this.name, owner: this.owner });
-
-    return object;
-  },
-
-  delete: function() {
-    this.db.delete();
-  },
-
-  sendNotification: function(aId, aOperation, aRevisionId) {
-    debug("SendNotification");
-    if (aOperation != REVISION_VOID) {
-      cpmm.sendAsyncMessage("DataStore:Changed",
-                            { store: this.name, owner: this.owner,
-                              message: { revisionId: aRevisionId, id: aId,
-                                         operation: aOperation } } );
-    }
-  }
-};
-
-/* DataStoreAccess */
-
-function DataStoreAccess(aAppId, aName, aOrigin, aReadOnly) {
-  this.appId = aAppId;
-  this.name = aName;
-  this.origin = aOrigin;
-  this.readOnly = aReadOnly;
-}
-
-DataStoreAccess.prototype = {};
deleted file mode 100644
--- a/dom/datastore/DataStore.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-component {d193d0e2-c677-4a7b-bb0a-19155b470f2e} DataStoreService.js
-contract @mozilla.org/datastore-service;1 {d193d0e2-c677-4a7b-bb0a-19155b470f2e}
deleted file mode 100644
--- a/dom/datastore/DataStoreChangeNotifier.jsm
+++ /dev/null
@@ -1,110 +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/. */
-
-"use strict"
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-this.EXPORTED_SYMBOLS = ["DataStoreChangeNotifier"];
-
-function debug(s) {
-  //dump('DEBUG DataStoreChangeNotifier: ' + s + '\n');
-}
-
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-Cu.import("resource://gre/modules/Services.jsm");
-
-const kFromDataStoreChangeNotifier = "fromDataStoreChangeNotifier";
-
-XPCOMUtils.defineLazyServiceGetter(this, "ppmm",
-                                   "@mozilla.org/parentprocessmessagemanager;1",
-                                   "nsIMessageBroadcaster");
-
-this.DataStoreChangeNotifier = {
-  children: [],
-  messages: [ "DataStore:Changed", "DataStore:RegisterForMessages",
-              "child-process-shutdown" ],
-
-  init: function() {
-    debug("init");
-
-    this.messages.forEach((function(msgName) {
-      ppmm.addMessageListener(msgName, this);
-    }).bind(this));
-
-    Services.obs.addObserver(this, 'xpcom-shutdown', false);
-  },
-
-  observe: function(aSubject, aTopic, aData) {
-    debug("observe");
-
-    switch (aTopic) {
-      case 'xpcom-shutdown':
-        this.messages.forEach((function(msgName) {
-          ppmm.removeMessageListener(msgName, this);
-        }).bind(this));
-
-        Services.obs.removeObserver(this, 'xpcom-shutdown');
-        ppmm = null;
-        break;
-
-      default:
-        debug("Wrong observer topic: " + aTopic);
-        break;
-    }
-  },
-
-  broadcastMessage: function broadcastMessage(aMsgName, aData) {
-    debug("Broadast");
-    this.children.forEach(function(obj) {
-      if (obj.store == aData.store && obj.owner == aData.owner) {
-        obj.mm.sendAsyncMessage(aMsgName, aData.message);
-      }
-    });
-  },
-
-  receiveMessage: function(aMessage) {
-    debug("receiveMessage");
-
-    switch (aMessage.name) {
-      case "DataStore:Changed":
-        this.broadcastMessage("DataStore:Changed:Return:OK", aMessage.data);
-        break;
-
-      case "DataStore:RegisterForMessages":
-        debug("Register!");
-
-        for (let i = 0; i < this.children.length; ++i) {
-          if (this.children[i].mm == aMessage.target &&
-              this.children[i].store == aMessage.data.store &&
-              this.children[i].owner == aMessage.data.owner) {
-            return;
-          }
-        }
-
-        this.children.push({ mm: aMessage.target,
-                             store: aMessage.data.store,
-                             owner: aMessage.data.owner });
-        break;
-
-      case "child-process-shutdown":
-        debug("Unregister");
-
-        for (let i = 0; i < this.children.length;) {
-          if (this.children[i].mm == aMessage.target) {
-            debug("Unregister index: " + i);
-            this.children.splice(i, 1);
-          } else {
-            ++i;
-          }
-        }
-        break;
-
-      default:
-        debug("Wrong message: " + aMessage.name);
-    }
-  }
-}
-
-DataStoreChangeNotifier.init();
deleted file mode 100644
--- a/dom/datastore/DataStoreDB.jsm
+++ /dev/null
@@ -1,104 +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/. */
-
-'use strict';
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-this.EXPORTED_SYMBOLS = ['DataStoreDB'];
-
-function debug(s) {
-  // dump('DEBUG DataStoreDB: ' + s + '\n');
-}
-
-const DATASTOREDB_VERSION = 1;
-const DATASTOREDB_OBJECTSTORE_NAME = 'DataStoreDB';
-const DATASTOREDB_REVISION = 'revision';
-const DATASTOREDB_REVISION_INDEX = 'revisionIndex';
-
-Cu.import('resource://gre/modules/IndexedDBHelper.jsm');
-Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-
-XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
-                                   "@mozilla.org/uuid-generator;1",
-                                   "nsIUUIDGenerator");
-
-this.DataStoreDB = function DataStoreDB() {}
-
-DataStoreDB.prototype = {
-
-  __proto__: IndexedDBHelper.prototype,
-
-  upgradeSchema: function(aTransaction, aDb, aOldVersion, aNewVersion) {
-    debug('updateSchema');
-    aDb.createObjectStore(DATASTOREDB_OBJECTSTORE_NAME, { autoIncrement: true });
-    let store = aDb.createObjectStore(DATASTOREDB_REVISION,
-                                      { autoIncrement: true,
-                                        keyPath: 'internalRevisionId' });
-    store.createIndex(DATASTOREDB_REVISION_INDEX, 'revisionId', { unique: true });
-  },
-
-  init: function(aOrigin, aName, aGlobal) {
-    let dbName = aOrigin + '_' + aName;
-    this.initDBHelper(dbName, DATASTOREDB_VERSION,
-                      [DATASTOREDB_OBJECTSTORE_NAME, DATASTOREDB_REVISION], aGlobal);
-  },
-
-  txn: function(aType, aCallback, aErrorCb) {
-    debug('Transaction request');
-    this.newTxn(
-      aType,
-      aType == 'readonly'
-        ? [ DATASTOREDB_OBJECTSTORE_NAME ] : [ DATASTOREDB_OBJECTSTORE_NAME, DATASTOREDB_REVISION ],
-      function(aTxn, aStores) {
-        aType == 'readonly' ? aCallback(aTxn, aStores[0], null) : aCallback(aTxn, aStores[0], aStores[1]);
-      },
-      function() {},
-      aErrorCb
-    );
-  },
-
-  revisionTxn: function(aType, aCallback, aErrorCb) {
-    debug("Transaction request");
-    this.newTxn(
-      aType,
-      DATASTOREDB_REVISION,
-      aCallback,
-      function() {},
-      aErrorCb
-    );
-  },
-
-  addRevision: function(aStore, aId, aType, aSuccessCb) {
-    debug("AddRevision: " + aId + " - " + aType);
-    let revisionId =  uuidgen.generateUUID().toString();
-    let request = aStore.put({ revisionId: revisionId, objectId: aId, operation: aType });
-    request.onsuccess = function() {
-      aSuccessCb(revisionId);
-    }
-  },
-
-  getInternalRevisionId: function(aRevisionId, aStore, aSuccessCb) {
-    debug('GetInternalRevisionId');
-    let request = aStore.index(DATASTOREDB_REVISION_INDEX).getKey(aRevisionId);
-    request.onsuccess = function(aEvent) {
-      aSuccessCb(aEvent.target.result);
-    }
-  },
-
-  clearRevisions: function(aStore, aSuccessCb) {
-    debug("ClearRevisions");
-    let request = aStore.clear();
-    request.onsuccess = function() {
-      aSuccessCb();
-    }
-  },
-
-  delete: function() {
-    debug('delete');
-    this.close();
-    this.dbGlobal.indexedDB.deleteDatabase(this.dbName);
-    debug('database deleted');
-  }
-}
deleted file mode 100644
--- a/dom/datastore/DataStoreService.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- Mode: js2; js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
-/* vim: set ft=javascript ts=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/. */
-
-'use strict'
-
-/* static functions */
-
-function debug(s) {
-  // dump('DEBUG DataStoreService: ' + s + '\n');
-}
-
-const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
-
-Cu.import('resource://gre/modules/XPCOMUtils.jsm');
-Cu.import('resource://gre/modules/Services.jsm');
-Cu.import('resource://gre/modules/DataStore.jsm');
-
-const GLOBAL_SCOPE = this;
-
-/* DataStoreService */
-
-const DATASTORESERVICE_CID = Components.ID('{d193d0e2-c677-4a7b-bb0a-19155b470f2e}');
-
-function DataStoreService() {
-  debug('DataStoreService Constructor');
-
-  let obs = Services.obs;
-  if (!obs) {
-    debug("DataStore Error: observer-service is null!");
-    return;
-  }
-
-  obs.addObserver(this, 'webapps-clear-data', false);
-
-  let idbManager = Cc["@mozilla.org/dom/indexeddb/manager;1"]
-                     .getService(Ci.nsIIndexedDatabaseManager);
-  if (!idbManager) {
-    debug("DataStore Error: indexedDb Manager is null!");
-  }
-
-  idbManager.initWindowless(GLOBAL_SCOPE);
-}
-
-DataStoreService.prototype = {
-  // Hash of DataStores
-  stores: {},
-  accessStores: {},
-
-  installDataStore: function(aAppId, aName, aOwner, aReadOnly) {
-    debug('installDataStore - appId: ' + aAppId + ', aName: ' +
-          aName + ', aOwner:' + aOwner + ', aReadOnly: ' +
-          aReadOnly);
-
-    if (aName in this.stores && aAppId in this.stores[aName]) {
-      debug('This should not happen');
-      return;
-    }
-
-    let store = new DataStore(aAppId, aName, aOwner, aReadOnly, GLOBAL_SCOPE);
-
-    if (!(aName in this.stores)) {
-      this.stores[aName] = {};
-    }
-
-    this.stores[aName][aAppId] = store;
-  },
-
-  installAccessDataStore: function(aAppId, aName, aOwner, aReadOnly) {
-    debug('installDataStore - appId: ' + aAppId + ', aName: ' +
-          aName + ', aOwner:' + aOwner + ', aReadOnly: ' +
-          aReadOnly);
-
-    if (aName in this.accessStores && aAppId in this.accessStores[aName]) {
-      debug('This should not happen');
-      return;
-    }
-
-    let accessStore = new DataStoreAccess(aAppId, aName, aOwner, aReadOnly);
-
-    if (!(aName in this.accessStores)) {
-      this.accessStores[aName] = {};
-    }
-
-    this.accessStores[aName][aAppId] = accessStore;
-  },
-
-  getDataStores: function(aWindow, aName) {
-    debug('getDataStores - aName: ' + aName);
-    let appId = aWindow.document.nodePrincipal.appId;
-
-    let self = this;
-    return new aWindow.Promise(function(resolver) {
-      let matchingStores = [];
-
-      if (aName in self.stores) {
-        if (appId in self.stores[aName]) {
-          matchingStores.push({ store: self.stores[aName][appId],
-                                readonly: false });
-        }
-
-        for (var i in self.stores[aName]) {
-          if (i == appId) {
-            continue;
-          }
-
-          let access = self.getDataStoreAccess(self.stores[aName][i], appId);
-          if (!access) {
-            continue;
-          }
-
-          let readOnly = self.stores[aName][i].readOnly || access.readOnly;
-          matchingStores.push({ store: self.stores[aName][i],
-                                readonly: readOnly });
-        }
-      }
-
-      let callbackPending = matchingStores.length;
-      let results = [];
-
-      if (!callbackPending) {
-        resolver.resolve(results);
-        return;
-      }
-
-      for (let i = 0; i < matchingStores.length; ++i) {
-        let obj = matchingStores[i].store.exposeObject(aWindow,
-                                    matchingStores[i].readonly);
-        results.push(obj);
-
-        matchingStores[i].store.retrieveRevisionId(
-          function() {
-            --callbackPending;
-            if (!callbackPending) {
-              resolver.resolve(results);
-            }
-          },
-          // if the revision is already known, we don't need to retrieve it
-          // again.
-          false
-        );
-      }
-    });
-  },
-
-  getDataStoreAccess: function(aStore, aAppId) {
-    if (!(aStore.name in this.accessStores) ||
-        !(aAppId in this.accessStores[aStore.name])) {
-      return null;
-    }
-
-    return this.accessStores[aStore.name][aAppId];
-  },
-
-  observe: function observe(aSubject, aTopic, aData) {
-    debug('getDataStores - aTopic: ' + aTopic);
-    if (aTopic != 'webapps-clear-data') {
-      return;
-    }
-
-    let params =
-      aSubject.QueryInterface(Ci.mozIApplicationClearPrivateDataParams);
-
-    // DataStore is explosed to apps, not browser content.
-    if (params.browserOnly) {
-      return;
-    }
-
-    for (let key in this.stores) {
-      if (params.appId in this.stores[key]) {
-        this.stores[key][params.appId].delete();
-        delete this.stores[key][params.appId];
-      }
-
-      if (!this.stores[key].length) {
-        delete this.stores[key];
-      }
-    }
-  },
-
-  classID : DATASTORESERVICE_CID,
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsIDataStoreService,
-                                         Ci.nsIObserver]),
-  classInfo: XPCOMUtils.generateCI({
-    classID: DATASTORESERVICE_CID,
-    contractID: '@mozilla.org/datastore-service;1',
-    interfaces: [Ci.nsIDataStoreService, Ci.nsIObserver],
-    flags: Ci.nsIClassInfo.SINGLETON
-  })
-};
-
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([DataStoreService]);
deleted file mode 100644
--- a/dom/datastore/moz.build
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; 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/.
-
-TEST_DIRS += ['tests']
-
-XPIDL_SOURCES += [
-    'nsIDataStoreService.idl',
-]
-
-XPIDL_MODULE = 'dom_datastore'
-
-MODULE = 'dom'
-
-EXTRA_COMPONENTS += [
-    'DataStore.manifest',
-    'DataStoreService.js',
-]
-
-EXTRA_JS_MODULES += [
-    'DataStore.jsm',
-    'DataStoreChangeNotifier.jsm',
-    'DataStoreDB.jsm',
-]
deleted file mode 100644
--- a/dom/datastore/nsIDataStoreService.idl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- 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 "nsISupports.idl"
-
-interface nsIDOMWindow;
-
-[scriptable, uuid(d193d0e2-c677-4a7b-bb0a-19155b470f2e)]
-interface nsIDataStoreService : nsISupports
-{
-  void installDataStore(in unsigned long appId,
-                        in DOMString name,
-                        in DOMString manifestURL,
-                        in boolean readOnly);
-
-  void installAccessDataStore(in unsigned long appId,
-                              in DOMString name,
-                              in DOMString manifestURL,
-                              in boolean readOnly);
-
-  nsISupports getDataStores(in nsIDOMWindow window,
-                            in DOMString name);
-};
deleted file mode 100644
--- a/dom/datastore/tests/Makefile.in
+++ /dev/null
@@ -1,33 +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/.
-
-DEPTH            = @DEPTH@
-topsrcdir        = @top_srcdir@
-srcdir           = @srcdir@
-VPATH            = @srcdir@
-
-relativesrcdir   = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MOCHITEST_FILES = \
-  test_app_install.html \
-  file_app_install.html \
-  test_readonly.html \
-  file_readonly.html \
-  test_basic.html \
-  file_basic.html \
-  test_revision.html \
-  file_revision.html \
-  test_changes.html \
-  file_changes.html \
-  file_changes2.html \
-  file_app.sjs \
-  file_app.template.webapp \
-  file_app2.template.webapp \
-  test_arrays.html \
-  file_arrays.html \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/datastore/tests/file_app.sjs
+++ /dev/null
@@ -1,56 +0,0 @@
-var gBasePath = "tests/dom/datastore/tests/";
-
-function handleRequest(request, response) {
-  var query = getQuery(request);
-
-  var testToken = '';
-  if ('testToken' in query) {
-    testToken = query.testToken;
-  }
-
-  var template = 'file_app.template.webapp';
-  if ('template' in query) {
-    template = query.template;
-  }
-  var template = gBasePath + template;
-  response.setHeader("Content-Type", "application/x-web-app-manifest+json", false);
-  response.write(readTemplate(template).replace(/TESTTOKEN/g, testToken));
-}
-
-// Copy-pasted incantations. There ought to be a better way to synchronously read
-// a file into a string, but I guess we're trying to discourage that.
-function readTemplate(path) {
-  var file = Components.classes["@mozilla.org/file/directory_service;1"].
-                        getService(Components.interfaces.nsIProperties).
-                        get("CurWorkD", Components.interfaces.nsILocalFile);
-  var fis  = Components.classes['@mozilla.org/network/file-input-stream;1'].
-                        createInstance(Components.interfaces.nsIFileInputStream);
-  var cis = Components.classes["@mozilla.org/intl/converter-input-stream;1"].
-                       createInstance(Components.interfaces.nsIConverterInputStream);
-  var split = path.split("/");
-  for(var i = 0; i < split.length; ++i) {
-    file.append(split[i]);
-  }
-  fis.init(file, -1, -1, false);
-  cis.init(fis, "UTF-8", 0, 0);
-
-  var data = "";
-  let (str = {}) {
-    let read = 0;
-    do {
-      read = cis.readString(0xffffffff, str); // read as much as we can and put it in str.value
-      data += str.value;
-    } while (read != 0);
-  }
-  cis.close();
-  return data;
-}
-
-function getQuery(request) {
-  var query = {};
-  request.queryString.split('&').forEach(function (val) {
-    var [name, value] = val.split('=');
-    query[name] = unescape(value);
-  });
-  return query;
-}
deleted file mode 100644
--- a/dom/datastore/tests/file_app.template.webapp
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "name": "Really Rapid Release (hosted)",
-  "description": "Updated even faster than <a href='http://mozilla.org'>Firefox</a>, just to annoy slashdotters.",
-  "launch_path": "/tests/dom/datastore/tests/TESTTOKEN",
-  "icons": { "128": "default_icon" },
-  "datastores-owned" : {
-    "foo" : { "access": "readwrite", "description" : "This store is called foo" },
-    "bar" : { "access": "readonly", "description" : "This store is called bar" }
-  }
-}
deleted file mode 100644
--- a/dom/datastore/tests/file_app2.template.webapp
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "name": "Really Rapid Release (hosted) - app 2",
-  "description": "Updated even faster than <a href='http://mozilla.org'>Firefox</a>, just to annoy slashdotters.",
-  "launch_path": "/tests/dom/datastore/tests/TESTTOKEN",
-  "icons": { "128": "default_icon" },
-  "datastores-access" : {
-    "foo" : { "readonly": false, "description" : "This store is called foo" },
-    "bar" : { "readonly": true, "description" : "This store is called bar" }
-  }
-}
deleted file mode 100644
--- a/dom/datastore/tests/file_app_install.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - install/uninstall apps</title>
-<body>
-  <script type="application/javascript;version=1.7">
-
-   function is(a, b, msg) {
-     alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-   }
-
-   function ok(a, msg) {
-     alert((a ? 'OK' : 'KO')+ ' ' + msg)
-   }
-
-   function cbError() {
-     alert('KO error');
-   }
-
-   function finish() {
-     alert('DONE');
-   }
-
-   navigator.getDataStores('foo').then(function(stores) {
-     is(stores.length, 1, "getDataStores('foo') returns 1 element");
-     is(stores[0].name, 'foo', 'The dataStore.name is foo');
-     ok(stores[0].owner, 'The dataStore.owner exists');
-     is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
-
-     navigator.getDataStores('bar').then(function(stores) {
-       is(stores.length, 1, "getDataStores('bar') returns 1 element");
-       is(stores[0].name, 'bar', 'The dataStore.name is bar');
-       ok(stores[0].owner, 'The dataStore.owner exists');
-       is(stores[0].readOnly, false, 'The dataStore bar is in readonly');
-       finish();
-     }, cbError);
-   }, cbError);
-  </script>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_arrays.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - add([array]) remove([array])</title>
-</head>
-<body>
-<div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
-  var gStore;
-
-  function is(a, b, msg) {
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function testGetDataStores() {
-    navigator.getDataStores('foo').then(function(stores) {
-      is(stores.length, 1, "getDataStores('foo') returns 1 element");
-      is(stores[0].name, 'foo', 'The dataStore.name is foo');
-      is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
-
-      var store = stores[0];
-      ok("get" in store, "store.get exists");
-      ok("update" in store, "store.update exists");
-      ok("add" in store, "store.add exists");
-      ok("remove" in store, "store.remove exists");
-      ok("clear" in store, "store.clear exists");
-
-      gStore = stores[0];
-
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreAdd() {
-    var objects = [];
-    for (var i = 0; i < 300; ++i) {
-      objects.push(i);
-    }
-
-    function testStoreAddInternal() {
-      if (!objects.length) {
-        ok(true, "We inserted 300 items");
-        runTest();
-        return;
-      }
-
-      var obj = objects.shift();
-      gStore.add(obj).then(function() {
-        ok(true, "We inserted a new item!");
-        testStoreAddInternal();
-      }, cbError);
-    }
-
-    testStoreAddInternal();
-  }
-
-  function testStoreGet() {
-    var objects = [];
-    for (var i = 1; i <= 300; ++i) {
-      objects.push(i);
-    }
-
-    gStore.get(objects).then(function(data) {
-       is(data.length, objects.length, "Get - Data matches");
-       for (var i = 0; i < data.length; ++i) {
-         is(data[i], objects[i] - 1, "Get - Data matches: " + i + " " + data[i] + " == " + objects[i]);
-       }
-       runTest();
-    }, cbError);
-  }
-
-  var tests = [
-    // Test for GetDataStore
-    testGetDataStores,
-
-    // Add many items
-    function() { testStoreAdd() },
-    function() { testStoreGet() },
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTest();
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_basic.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-</head>
-<body>
-<div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
-  var gStore;
-
-  function is(a, b, msg) {
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function testGetDataStores() {
-    navigator.getDataStores('foo').then(function(stores) {
-      is(stores.length, 1, "getDataStores('foo') returns 1 element");
-      is(stores[0].name, 'foo', 'The dataStore.name is foo');
-      is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
-
-      var store = stores[0];
-      ok("get" in store, "store.get exists");
-      ok("update" in store, "store.update exists");
-      ok("add" in store, "store.add exists");
-      ok("remove" in store, "store.remove exists");
-      ok("clear" in store, "store.clear exists");
-
-      gStore = stores[0];
-
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreGet(id, value) {
-    gStore.get(id).then(function(what) {
-      ok(true, "store.get() retrieves data");
-      is(what, value, "store.get(" + id + ") returns " + value);
-    }, function() {
-      ok(false, "store.get(" + id + ") retrieves data");
-    }).then(runTest, cbError);
-  }
-
-  function testStoreAdd(value) {
-    return gStore.add(value).then(function(what) {
-      ok(true, "store.add() is called");
-      ok(what > 0, "store.add() returns something");
-      return what;
-    }, cbError);
-  }
-
-  function testStoreUpdate(id, value) {
-    return gStore.update(id, value).then(function() {
-      ok(true, "store.update() is called");
-    }, cbError);
-  }
-
-  function testStoreGetLength(number) {
-    return gStore.getLength().then(function(n) {
-      is(number, n, "store.getLength() returns the right number");
-    }, cbError);
-  }
-
-  function testStoreRemove(id) {
-    return gStore.remove(id).then(function() {
-      ok(true, "store.remove() is called");
-    }, cbError);
-  }
-
-  function testStoreClear() {
-    return gStore.clear().then(function() {
-      ok(true, "store.clear() is called");
-    }, cbError);
-  }
-
-  var tests = [
-    // Test for GetDataStore
-    testGetDataStores,
-
-    // Unknown ID
-    function() { testStoreGet(42, undefined); },
-    function() { testStoreGet(42, undefined); }, // twice
-
-    // Add + Get - number
-    function() { testStoreAdd(42).then(function(id) {
-                   gId = id; runTest(); }, cbError); },
-    function() { testStoreGet(gId, 42); },
-    function() { testStoreGet(gId + "", 42); },
-
-    // Add + Get - boolean
-    function() { testStoreAdd(true).then(function(id) {
-                   gId = id; runTest(); }, cbError); },
-    function() { testStoreGet(gId, true); },
-
-    // Add + Get - string
-    function() { testStoreAdd("hello world").then(function(id) {
-                   gId = id; runTest(); }, cbError); },
-    function() { testStoreGet(gId, "hello world"); },
-
-    // Update + Get - string
-    function() { testStoreUpdate(gId, "hello world 2").then(function() {
-                   runTest(); }, cbError); },
-    function() { testStoreGet(gId, "hello world 2"); },
-
-    // getLength
-    function() { testStoreGetLength(3).then(function() { runTest(); }, cbError); },
-
-    // Remove
-    function() { testStoreRemove(gId).then(function(what) {
-                   runTest(); }, cbError); },
-    function() { testStoreGet(gId).catch(function() {
-                   runTest(); }); },
-
-    // Remove - wrong ID
-    function() { testStoreRemove(gId).then(function(what) {
-                   runTest(); }, cbError); },
-
-    // Clear
-    function() { testStoreClear().then(function(what) {
-                   runTest(); }, cbError); },
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTest();
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_changes.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-  <script type="application/javascript;version=1.7">
-
-  var gStore;
-  var gChangeId = null;
-  var gChangeOperation = null;
-
-  function is(a, b, msg) {
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function testGetDataStores() {
-    navigator.getDataStores('foo').then(function(stores) {
-      is(stores.length, 1, "getDataStores('foo') returns 1 element");
-      is(stores[0].name, 'foo', 'The dataStore.name is foo');
-      is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
-
-      gStore = stores[0];
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreAdd(value, expectedId) {
-    gStore.add(value).then(function(id) {
-      is(id, expectedId, "store.add() is called");
-    }, cbError);
-  }
-
-  function testStoreUpdate(id, value) {
-    gStore.update(id, value).then(function(retId) {
-      is(id, retId, "store.update() is called with the right id");
-    }, cbError);
-  }
-
-  function testStoreRemove(id, expectedSuccess) {
-    gStore.remove(id).then(function(success) {
-      is(success, expectedSuccess, "store.remove() returns the right value");
-    }, cbError);
-  }
-
-  function eventListener(evt) {
-    ok(evt, "OnChangeListener is called with data");
-    is(/[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}/.test(evt.revisionId), true, "event.revisionId returns something");
-    is(evt.id, gChangeId, "OnChangeListener is called with the right ID: " + evt.id);
-    is(evt.operation, gChangeOperation, "OnChangeListener is called with the right operation:" + evt.operation + " " + gChangeOperation);
-    runTest();
-  }
-
-  var tests = [
-    // Test for GetDataStore
-    testGetDataStores,
-
-    // Add onchange = function
-    function() {
-      gStore.onchange = eventListener;
-      is(gStore.onchange, eventListener, "onChange is set");
-      runTest();
-    },
-
-    // Add
-    function() { gChangeId = 1; gChangeOperation = 'added';
-                 testStoreAdd({ number: 42 }, 1); },
-
-    // Update
-    function() { gChangeId = 1; gChangeOperation = 'updated';
-                 testStoreUpdate(1, { number: 43 }); },
-
-    // Remove
-    function() { gChangeId = 1; gChangeOperation = 'removed';
-                 testStoreRemove(1, true); },
-
-    // Remove onchange function and replace it with addEventListener
-    function() {
-      gStore.onchange = null;
-      gStore.addEventListener('change', eventListener);
-      runTest();
-    },
-
-    // Add
-    function() { gChangeId = 2; gChangeOperation = 'added';
-                 testStoreAdd({ number: 42 }, 2); },
-
-    // Update
-    function() { gChangeId = 2; gChangeOperation = 'updated';
-                 testStoreUpdate(2, { number: 43 }); },
-
-    // Remove
-    function() { gChangeId = 2; gChangeOperation = 'removed';
-                 testStoreRemove(2, true); },
-
-    // Remove event listener
-    function() {
-      gStore.removeEventListener('change', eventListener);
-      runTest();
-    },
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTest();
-  </script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_changes2.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-  <script type="application/javascript;version=1.7">
-
-  function is(a, b, msg) {
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function eventListener(obj) {
-    ok(obj, "OnChangeListener is called with data");
-    finish();
-  }
-
-  navigator.getDataStores('foo').then(function(stores) {
-    is(stores.length, 1, "getDataStores('foo') returns 1 element");
-    is(stores[0].name, 'foo', 'The dataStore.name is foo');
-
-    stores[0].onchange = eventListener;
-    alert('READY');
-  });
-  </script>
-</pre>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_readonly.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-</head>
-<body>
-  <div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
-  function is(a, b, msg) {
-    dump((a === b ? 'OK' : 'KO') + ' ' + msg + "\n")
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function runTest() {
-    navigator.getDataStores('bar').then(function(stores) {
-      is(stores.length, 1, "getDataStores('bar') returns 1 element");
-      is(stores[0].name, 'bar', 'The dataStore.name is bar');
-      is(stores[0].readOnly, true, 'The dataStore bar is eadonly');
-
-      var store = stores[0];
-      ok("get" in store, "store.get exists");
-      ok("update" in store, "store.update exists");
-      ok("add" in store, "store.add exists");
-      ok("remove" in store, "store.remove exists");
-      ok("clear" in store, "store.clear exists");
-
-      var f = store.clear();
-      f = f.then(cbError, function() {
-        ok(true, "store.clear() fails because the db is readonly");
-        return store.remove(123);
-      });
-
-      f = f.then(cbError, function() {
-        ok(true, "store.remove() fails because the db is readonly");
-        return store.add(123, true);
-      });
-
-      f = f.then(cbError, function() {
-        ok(true, "store.add() fails because the db is readonly");
-        return store.update(123, {});
-      })
-
-      f = f.then(cbError, function() {
-        ok(true, "store.update() fails because the db is readonly");
-      })
-
-      f.then(function() {
-        // All done.
-        ok(true, "All done");
-        finish();
-      });
-    }, cbError);
-  }
-
-  runTest();
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/file_revision.html
+++ /dev/null
@@ -1,196 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-  <script type="application/javascript;version=1.7">
-
-  var gStore;
-  var gPreviousRevisionId = '';
-
-  function is(a, b, msg) {
-    alert((a === b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function isnot(a, b, msg) {
-    alert((a !== b ? 'OK' : 'KO') + ' ' + msg)
-  }
-
-  function ok(a, msg) {
-    alert((a ? 'OK' : 'KO')+ ' ' + msg)
-  }
-
-  function cbError() {
-    alert('KO error');
-  }
-
-  function finish() {
-    alert('DONE');
-  }
-
-  function testGetDataStores() {
-    navigator.getDataStores('foo').then(function(stores) {
-      is(stores.length, 1, "getDataStores('foo') returns 1 element");
-      is(stores[0].name, 'foo', 'The dataStore.name is foo');
-      is(stores[0].readOnly, false, 'The dataStore foo is not in readonly');
-
-      gStore = stores[0];
-
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreAdd(value, expectedId) {
-    return gStore.add(value).then(function(id) {
-      is(id, expectedId, "store.add() is called");
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreUpdate(id, value) {
-    return gStore.update(id, value).then(function(retId) {
-      is(id, retId, "store.update() is called with the right id");
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreRemove(id, expectedSuccess) {
-    return gStore.remove(id).then(function(success) {
-      is(success, expectedSuccess, "store.remove() returns the right value");
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreRevisionId() {
-    is(/[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}/.test(gStore.revisionId), true, "store.revisionId returns something");
-    runTest();
-  }
-
-  function testStoreWrongRevisions(id) {
-    return gStore.getChanges(id).then(
-      function(what) {
-        is(what, undefined, "Wrong revisionId == undefined object");
-        runTest();
-      }, cbError);
-  }
-
-  function testStoreRevisions(id, changes) {
-    return gStore.getChanges(id).then(function(what) {
-      is(JSON.stringify(changes.addedIds),
-         JSON.stringify(what.addedIds), "store.revisions - addedIds: " +
-         JSON.stringify(what.addedIds) + " | " + JSON.stringify(changes.addedIds));
-      is(JSON.stringify(changes.updatedIds),
-         JSON.stringify(what.updatedIds), "store.revisions - updatedIds: " +
-         JSON.stringify(what.updatedIds) + " | " + JSON.stringify(changes.updatedIds));
-      is(JSON.stringify(changes.removedIds),
-         JSON.stringify(what.removedIds), "store.revisions - removedIds: " +
-         JSON.stringify(what.removedIds) + " | " + JSON.stringify(changes.removedIds));
-      runTest();
-    }, cbError);
-  }
-
-  function testStoreRevisionIdChanged() {
-    isnot(gStore.revisionId, gPreviousRevisionId, "Revision changed");
-    gPreviousRevisionId = gStore.revisionId;
-    runTest();
-  }
-
-  function testStoreRevisionIdNotChanged() {
-    is(gStore.revisionId, gPreviousRevisionId, "Revision changed");
-    runTest();
-  }
-
-  var revisions = [];
-
-  var tests = [
-    // Test for GetDataStore
-    testGetDataStores,
-
-    // The first revision is not empty
-    testStoreRevisionIdChanged,
-
-    // wrong revision ID
-    function() { testStoreWrongRevisions('foobar'); },
-
-    // Add
-    function() { testStoreAdd({ number: 42 }, 1); },
-    function() { revisions.push(gStore.revisionId); testStoreRevisionId(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    // Add
-    function() { testStoreAdd({ number: 42 }, 2); },
-    function() { revisions.push(gStore.revisionId); runTest(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [2], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[1], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    // Add
-    function() { testStoreAdd({ number: 42 }, 3); },
-    function() { revisions.push(gStore.revisionId); runTest(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [2,3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[1], { addedIds: [3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[2], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    // Update
-    function() { testStoreUpdate(3, { number: 43 }); },
-    function() { revisions.push(gStore.revisionId); runTest(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [2,3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[1], { addedIds: [3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[2], { addedIds: [], updatedIds: [3], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[3], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    // Update
-    function() { testStoreUpdate(3, { number: 42 }); },
-    function() { revisions.push(gStore.revisionId); runTest(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [2,3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[1], { addedIds: [3], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[2], { addedIds: [], updatedIds: [3], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[3], { addedIds: [], updatedIds: [3], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[4], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    // Remove
-    function() { testStoreRemove(3, true); },
-    function() { revisions.push(gStore.revisionId); runTest(); },
-    testStoreRevisionIdChanged,
-    function() { testStoreRevisions(revisions[0], { addedIds: [2], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[1], { addedIds: [], updatedIds: [], removedIds: [] }); },
-    function() { testStoreRevisions(revisions[2], { addedIds: [], updatedIds: [], removedIds: [3] }); },
-    function() { testStoreRevisions(revisions[3], { addedIds: [], updatedIds: [], removedIds: [3] }); },
-    function() { testStoreRevisions(revisions[4], { addedIds: [], updatedIds: [], removedIds: [3] }); },
-    function() { testStoreRevisions(revisions[5], { addedIds: [], updatedIds: [], removedIds: [] }); },
-
-    function() { testStoreRemove(3, false); },
-    testStoreRevisionIdNotChanged,
-
-    // Remove
-    function() { testStoreRemove(42, false); },
-    testStoreRevisionIdNotChanged,
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  runTest();
-  </script>
-</pre>
-</body>
-</html>
-
deleted file mode 100644
--- a/dom/datastore/tests/moz.build
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; 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/.
deleted file mode 100644
--- a/dom/datastore/tests/test_app_install.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - install/uninstall apps</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
- SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-
-  SimpleTest.waitForExplicitFinish();
-
-  var gBaseURL = 'http://test/tests/dom/datastore/tests/';
-  var gHostedManifestURL = gBaseURL + 'file_app.sjs?testToken=file_app_install.html';
-  var gGenerator = runTest();
-
-  SpecialPowers.pushPermissions(
-    [{ "type": "browser", "allow": 1, "context": document },
-     { "type": "embed-apps", "allow": 1, "context": document },
-     { "type": "webapps-manage", "allow": 1, "context": document }],
-    function() { gGenerator.next() });
-
-  function continueTest() {
-    try { gGenerator.next(); }
-    catch(e) { dump("Got exception: " + e + "\n"); }
-  }
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function runTest() {
-    ok("getDataStores" in navigator, "getDataStores exists");
-    is(typeof navigator.getDataStores, "function", "getDataStores exists and it's a function");
-    navigator.getDataStores('foo').then(function(stores) {
-      is(stores.length, 0, "getDataStores('foo') returns 0 elements");
-      continueTest();
-    }, cbError);
-    yield undefined;
-
-    SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
-
-    SpecialPowers.autoConfirmAppInstall(continueTest);
-    yield undefined;
-
-    var request = navigator.mozApps.install(gHostedManifestURL);
-    request.onerror = cbError;
-    request.onsuccess = continueTest;
-    yield undefined;
-
-    var app = request.result;
-    isnot(app, null, "App is non-null");
-    is(app.manifest.description, "Updated even faster than Firefox, just to annoy slashdotters.",
-       "Manifest is HTML-sanitized");
-
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', app.manifestURL);
-    ifr.setAttribute('src', app.manifest.launch_path);
-    var domParent = document.getElementById('container');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-
-        // Uninstall the app.
-        request = navigator.mozApps.mgmt.uninstall(app);
-        request.onerror = cbError;
-        request.onsuccess = function() {
-          // All done.
-          ok(true, "All done");
-          finish();
-        }
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-
-    domParent.appendChild(ifr);
-  }
-
-  function finish() {
-    SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled");
-    SimpleTest.finish();
-  }
-
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/test_arrays.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - add([array]) remove([array])</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
-  var gHostedManifestURL = 'http://test/tests/dom/datastore/tests/file_app.sjs?testToken=file_arrays.html';
-  var gApp;
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function installApp() {
-    var request = navigator.mozApps.install(gHostedManifestURL);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      gApp = request.result;
-      runTest();
-    }
-  }
-
-  function uninstallApp() {
-    // Uninstall the app.
-    var request = navigator.mozApps.mgmt.uninstall(gApp);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      // All done.
-      info("All done");
-      runTest();
-    }
-  }
-
-  function testApp() {
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', gApp.manifestURL);
-    ifr.setAttribute('src', gApp.manifest.launch_path);
-    var domParent = document.getElementById('container');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-        runTest();
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-    domParent.appendChild(ifr);
-  }
-
-  var tests = [
-    // Permissions
-    function() {
-      SpecialPowers.pushPermissions(
-        [{ "type": "browser", "allow": 1, "context": document },
-         { "type": "embed-apps", "allow": 1, "context": document },
-         { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
-    },
-
-    // Preferences
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
-      runTest();
-    },
-
-    // No confirmation needed when an app is installed
-    function() {
-      SpecialPowers.autoConfirmAppInstall(runTest);
-    },
-
-    // Installing the app
-    installApp,
-
-    // Run tests in app
-    testApp,
-
-    // Uninstall the app
-    uninstallApp
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  function finish() {
-    SimpleTest.finish();
-  }
-
-  SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-  SimpleTest.waitForExplicitFinish();
-  runTest();
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/test_basic.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<div id="container"></div>
-  <script type="application/javascript;version=1.7">
-
-  var gHostedManifestURL = 'http://test/tests/dom/datastore/tests/file_app.sjs?testToken=file_basic.html';
-  var gApp;
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function installApp() {
-    var request = navigator.mozApps.install(gHostedManifestURL);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      gApp = request.result;
-      runTest();
-    }
-  }
-
-  function uninstallApp() {
-    // Uninstall the app.
-    var request = navigator.mozApps.mgmt.uninstall(gApp);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      // All done.
-      info("All done");
-      runTest();
-    }
-  }
-
-  function testApp() {
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', gApp.manifestURL);
-    ifr.setAttribute('src', gApp.manifest.launch_path);
-    var domParent = document.getElementById('container');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-        runTest();
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-    domParent.appendChild(ifr);
-  }
-
-  var tests = [
-    // Permissions
-    function() {
-      SpecialPowers.pushPermissions(
-        [{ "type": "browser", "allow": 1, "context": document },
-         { "type": "embed-apps", "allow": 1, "context": document },
-         { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
-    },
-
-    // Preferences
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    function() {
-      SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
-      runTest();
-    },
-
-    // No confirmation needed when an app is installed
-    function() {
-      SpecialPowers.autoConfirmAppInstall(runTest);
-    },
-
-    // Installing the app
-    installApp,
-
-    // Run tests in app
-    testApp,
-
-    // Uninstall the app
-    uninstallApp
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  function finish() {
-    SimpleTest.finish();
-  }
-
-  SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-  SimpleTest.waitForExplicitFinish();
-  runTest();
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/test_changes.html
+++ /dev/null
@@ -1,177 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-  <script type="application/javascript;version=1.7">
-
-  var gHostedManifestURL = 'http://test/tests/dom/datastore/tests/file_app.sjs?testToken=file_changes.html';
-  var gHostedManifestURL2 = 'http://example.com/tests/dom/datastore/tests/file_app.sjs?testToken=file_changes2.html&template=file_app2.template.webapp';
-  var gApps = [];
-  var gApp2Events = 0;
-  var gStore;
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function installApp(aApp) {
-    var request = navigator.mozApps.install(aApp);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      gApps.push(request.result);
-      runTest();
-    }
-  }
-
-  function uninstallApps() {
-    if (!gApps.length) {
-      ok(true, "All done!");
-      runTest();
-      return;
-    }
-
-    var app = gApps.pop();
-    var request = navigator.mozApps.mgmt.uninstall(app);
-    request.onerror = cbError;
-    request.onsuccess = uninstallApps;
-  }
-
-  function setupApp2() {
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', gApps[1].manifestURL);
-    ifr.setAttribute('src', gApps[1].manifest.launch_path);
-    var domParent = document.getElementById('content');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/READY/.exec(message)) {
-        ok(true, "App2 ready");
-        runTest();
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-        gApp2Events++;
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-    domParent.appendChild(ifr);
-  }
-
-  function testApp1() {
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', gApps[0].manifestURL);
-    ifr.setAttribute('src', gApps[0].manifest.launch_path);
-    var domParent = document.getElementById('content');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-        runTest();
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-    domParent.appendChild(ifr);
-  }
-
-  function checkApp2() {
-    ok(gApp2Events, "App2 received events");
-    runTest();
-  }
-
-  var tests = [
-    // Permissions
-    function() {
-      SpecialPowers.pushPermissions(
-        [{ "type": "browser", "allow": 1, "context": document },
-         { "type": "embed-apps", "allow": 1, "context": document },
-         { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
-    },
-
-    // Preferences
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    // Enabling mozBrowser
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.mozBrowserFramesEnabled", true]]}, runTest);
-    },
-
-    // No confirmation needed when an app is installed
-    function() {
-      SpecialPowers.autoConfirmAppInstall(runTest);
-    },
-
-    // Installing the app1
-    function() { installApp(gHostedManifestURL); },
-
-    // Installing the app2
-    function() { installApp(gHostedManifestURL2); },
-
-    // Setup app2 for receving events
-    setupApp2,
-
-    // Run tests in app
-    testApp1,
-
-    // Check app2
-    checkApp2,
-
-    // Uninstall the apps
-    uninstallApps,
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  function finish() {
-    SimpleTest.finish();
-  }
-
-  SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-  SimpleTest.waitForExplicitFinish();
-  runTest();
-  </script>
-</pre>
-</body>
-</html>
-
-
deleted file mode 100644
--- a/dom/datastore/tests/test_readonly.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-  <div id="container"></div>
-  <script type="application/javascript;version=1.7">
-  var gHostedManifestURL = 'http://test/tests/dom/datastore/tests/file_app.sjs?testToken=file_readonly.html';
-  var gHostedManifestURL2 = 'http://example.com/tests/dom/datastore/tests/file_app.sjs?testToken=file_readonly.html&template=file_app2.template.webapp';
-  var gGenerator = runTest();
-
-  SpecialPowers.pushPermissions(
-    [{ "type": "browser", "allow": 1, "context": document },
-     { "type": "embed-apps", "allow": 1, "context": document },
-     { "type": "webapps-manage", "allow": 1, "context": document }],
-    function() { gGenerator.next() });
-
-  function continueTest() {
-    try { gGenerator.next(); }
-    catch(e) {}
-  }
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function runTest() {
-    SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true);
-
-    SpecialPowers.autoConfirmAppInstall(continueTest);
-    yield undefined;
-
-    var request = navigator.mozApps.install(gHostedManifestURL);
-    request.onerror = cbError;
-    request.onsuccess = continueTest;
-    yield undefined;
-
-    var app = request.result;
-
-    request = navigator.mozApps.install(gHostedManifestURL2);
-    request.onerror = cbError;
-    request.onsuccess = continueTest;
-    yield undefined;
-
-    var app2 = request.result;
-
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', app2.manifestURL);
-    ifr.setAttribute('src', app2.manifest.launch_path);
-    var domParent = document.getElementById('container');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-
-        // Uninstall the app.
-        request = navigator.mozApps.mgmt.uninstall(app);
-        request.onerror = cbError;
-        request.onsuccess = function() {
-          // Uninstall app2
-          request = navigator.mozApps.mgmt.uninstall(app2);
-          request.onerror = cbError;
-          request.onsuccess = function() {
-            // All done.
-            info("All done");
-            finish();
-          }
-        }
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-
-    domParent.appendChild(ifr);
-  }
-
-  function finish() {
-    SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled");
-    SimpleTest.finish();
-  }
-
-  SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-  SimpleTest.waitForExplicitFinish();
-  SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-  </script>
-</body>
-</html>
deleted file mode 100644
--- a/dom/datastore/tests/test_revision.html
+++ /dev/null
@@ -1,132 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<head>
-  <meta charset="utf-8">
-  <title>Test for DataStore - basic operation on a readonly db</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-  <script type="application/javascript;version=1.7">
-
-  var gBaseURL = 'http://test/tests/dom/datastore/tests/';
-  var gHostedManifestURL = gBaseURL + 'file_app.sjs?testToken=file_revision.html';
-  var gApp;
-  var gStore;
-  var gPreviousRevisionId = '';
-
-  function cbError() {
-    ok(false, "Error callback invoked");
-    finish();
-  }
-
-  function installApp() {
-    var request = navigator.mozApps.install(gHostedManifestURL);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      gApp = request.result;
-      runTest();
-    }
-  }
-
-  function uninstallApp() {
-    // Uninstall the app.
-    var request = navigator.mozApps.mgmt.uninstall(gApp);
-    request.onerror = cbError;
-    request.onsuccess = function() {
-      // All done.
-      ok(true, "All done");
-      runTest();
-    }
-  }
-
-  function testApp() {
-    var ifr = document.createElement('iframe');
-    ifr.setAttribute('mozbrowser', 'true');
-    ifr.setAttribute('mozapp', gApp.manifestURL);
-    ifr.setAttribute('src', gApp.manifest.launch_path);
-    var domParent = document.getElementById('content');
-
-    // Set us up to listen for messages from the app.
-    var listener = function(e) {
-      var message = e.detail.message;
-      if (/^OK/.exec(message)) {
-        ok(true, "Message from app: " + message);
-      } else if (/KO/.exec(message)) {
-        ok(false, "Message from app: " + message);
-      } else if (/DONE/.exec(message)) {
-        ok(true, "Messaging from app complete");
-        ifr.removeEventListener('mozbrowsershowmodalprompt', listener);
-        domParent.removeChild(ifr);
-        runTest();
-      }
-    }
-
-    // This event is triggered when the app calls "alert".
-    ifr.addEventListener('mozbrowsershowmodalprompt', listener, false);
-    domParent.appendChild(ifr);
-  }
-
-  var revisions = [];
-
-  var tests = [
-    // Permissions
-    function() {
-      SpecialPowers.pushPermissions(
-        [{ "type": "browser", "allow": 1, "context": document },
-         { "type": "embed-apps", "allow": 1, "context": document },
-         { "type": "webapps-manage", "allow": 1, "context": document }], runTest);
-    },
-
-    // Preferences
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.promise.enabled", true]]}, runTest);
-    },
-
-    // Enabling mozBrowser
-    function() {
-      SpecialPowers.pushPrefEnv({"set": [["dom.mozBrowserFramesEnabled", true]]}, runTest);
-    },
-
-    // No confirmation needed when an app is installed
-    function() {
-      SpecialPowers.autoConfirmAppInstall(runTest);
-    },
-
-    // Installing the app
-    installApp,
-
-    // Run tests in app
-    testApp,
-
-    // Uninstall the app
-    uninstallApp
-  ];
-
-  function runTest() {
-    if (!tests.length) {
-      finish();
-      return;
-    }
-
-    var test = tests.shift();
-    test();
-  }
-
-  function finish() {
-    SimpleTest.finish();
-  }
-
-  SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm");
-  SimpleTest.waitForExplicitFinish();
-  runTest();
-  </script>
-</pre>
-</body>
-</html>
-
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -41,17 +41,16 @@ PARALLEL_DIRS += [
     'activities',
     'bindings',
     'battery',
     'bluetooth',
     'browser-element',
     'contacts',
     'phonenumberutils',
     'alarm',
-    'datastore',
     'devicestorage',
     'encoding',
     'file',
     'fmradio',
     'media',
     'messages',
     'power',
     'push',
--- a/dom/power/PowerManager.cpp
+++ b/dom/power/PowerManager.cpp
@@ -1,30 +1,30 @@
 /* -*- 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 "mozilla/dom/PowerManager.h"
-
 #include "mozilla/Hal.h"
+#include "PowerManager.h"
 #include "WakeLock.h"
 #include "nsDOMClassInfoID.h"
 #include "nsIDOMWakeLockListener.h"
 #include "nsIDocument.h"
 #include "nsIPermissionManager.h"
 #include "nsIPowerManagerService.h"
 #include "nsIPrincipal.h"
 #include "nsPIDOMWindow.h"
 #include "nsServiceManagerUtils.h"
 #include "nsError.h"
 #include "mozilla/dom/MozPowerManagerBinding.h"
 
 namespace mozilla {
 namespace dom {
+namespace power {
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PowerManager)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_INTERFACE_MAP_ENTRY(nsIDOMMozWakeLockListener)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_2(PowerManager, mListeners, mWindow)
@@ -200,10 +200,11 @@ PowerManager::CreateInstance(nsPIDOMWind
   nsRefPtr<PowerManager> powerManager = new PowerManager();
   if (NS_FAILED(powerManager->Init(aWindow))) {
     powerManager = nullptr;
   }
 
   return powerManager.forget();
 }
 
+} // power
 } // dom
 } // mozilla
--- a/dom/power/PowerManager.h
+++ b/dom/power/PowerManager.h
@@ -14,16 +14,17 @@
 #include "nsWrapperCache.h"
 
 class nsPIDOMWindow;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
+namespace power {
 
 class PowerManager MOZ_FINAL : public nsIDOMMozWakeLockListener
                              , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PowerManager)
   NS_DECL_NSIDOMMOZWAKELOCKLISTENER
@@ -60,12 +61,13 @@ public:
   bool CpuSleepAllowed();
   void SetCpuSleepAllowed(bool aAllowed);
 
 private:
   nsCOMPtr<nsIDOMWindow> mWindow;
   nsTArray<nsCOMPtr<nsIDOMMozWakeLockListener> > mListeners;
 };
 
+} // namespace power
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_power_PowerManager_h
--- a/dom/power/WakeLock.cpp
+++ b/dom/power/WakeLock.cpp
@@ -9,17 +9,17 @@
 #include "mozilla/HalWakeLock.h"
 #include "nsDOMClassInfoID.h"
 #include "nsDOMEvent.h"
 #include "nsError.h"
 #include "nsIDocument.h"
 #include "nsIDOMWindow.h"
 #include "nsIDOMEvent.h"
 #include "nsPIDOMWindow.h"
-#include "mozilla/dom/PowerManager.h"
+#include "PowerManager.h"
 
 DOMCI_DATA(MozWakeLock, mozilla::dom::power::WakeLock)
 
 using namespace mozilla::hal;
 
 namespace mozilla {
 namespace dom {
 namespace power {
--- a/dom/power/moz.build
+++ b/dom/power/moz.build
@@ -10,21 +10,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 XPIDL_SOURCES += [
     'nsIDOMWakeLock.idl',
     'nsIDOMWakeLockListener.idl',
     'nsIPowerManagerService.idl',
 ]
 
 XPIDL_MODULE = 'dom_power'
 
-EXPORTS.mozilla.dom += [
+EXPORTS.mozilla.dom.power += [
     'PowerManager.h',
-]
-
-EXPORTS.mozilla.dom.power += [
     'PowerManagerService.h',
     'Types.h',
 ]
 
 CPP_SOURCES += [
     'PowerManager.cpp',
     'PowerManagerService.cpp',
     'WakeLock.cpp',
deleted file mode 100644
--- a/dom/webidl/DataStore.webidl
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: IDL; 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/.
- */
-
-[Pref="dom.datastore.enabled",
- JSImplementation="@mozilla.org/dom/datastore;1"]
-interface DataStore : EventTarget {
-  // Returns the label of the DataSource.
-  readonly attribute DOMString name;
-
-  // Returns the origin of the DataSource (e.g., 'facebook.com').
-  // This value is the manifest URL of the owner app.
-  readonly attribute DOMString owner;
-
-  // is readOnly a F(current_app, datastore) function? yes
-  readonly attribute boolean readOnly;
-
-  // Promise<any>
-  Promise get(unsigned long id);
-
-  // Promise<any>
-  Promise get(sequence<unsigned long> id);
-
-  // Promise<void>
-  Promise update(unsigned long id, any obj);
-
-  // Promise<unsigned long>
-  Promise add(any obj);
-
-  // Promise<boolean>
-  Promise remove(unsigned long id);
-
-  // Promise<void>
-  Promise clear();
-
-  readonly attribute DOMString revisionId;
-
-  attribute EventHandler onchange;
-
-  // Promise<DataStoreChanges>
-  Promise getChanges(DOMString revisionId);
-
-  // Promise<unsigned long>
-  Promise getLength();
-};
-
-dictionary DataStoreChanges {
-  DOMString revisionId;
-  sequence<unsigned long> addedIds;
-  sequence<unsigned long> updatedIds;
-  sequence<unsigned long> removedIds;
-};
deleted file mode 100644
--- a/dom/webidl/DataStoreChangeEvent.webidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: IDL; 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/.
- */
-
-dictionary DataStoreChangeEventInit : EventInit {
-  DOMString revisionId = "";
-  unsigned long id = 0;
-  DOMString operation = "";
-};
-
-[Pref="dom.datastore.enabled",
- Constructor(DOMString type, optional DataStoreChangeEventInit eventInitDict)]
-interface DataStoreChangeEvent : Event {
-  readonly attribute DOMString revisionId;
-  readonly attribute unsigned long id;
-  readonly attribute DOMString operation;
-};
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -103,24 +103,16 @@ Navigator implements NavigatorGeolocatio
 interface NavigatorBattery {
     // XXXbz Per spec this should be non-nullable, but we return null in
     // torn-down windows.  See bug 884925.
     [Throws, Func="Navigator::HasBatterySupport"]
     readonly attribute BatteryManager? battery;
 };
 Navigator implements NavigatorBattery;
 
-// https://wiki.mozilla.org/WebAPI/DataStore
-[NoInterfaceObject]
-interface NavigatorDataStore {
-    [Throws, Creator, Pref="dom.datastore.enabled"]
-    Promise getDataStores(DOMString name);
-};
-Navigator implements NavigatorDataStore;
-
 // http://www.w3.org/TR/vibration/#vibration-interface
 partial interface Navigator {
     // We don't support sequences in unions yet
     //boolean vibrate ((unsigned long or sequence<unsigned long>) pattern);
     // XXXbz also, per spec we should be returning a boolean, and we just don't.
     // See bug 884935.
     [Throws]
     void vibrate(unsigned long duration);
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -57,17 +57,16 @@ WEBIDL_FILES = [
     'Coordinates.webidl',
     'CSS.webidl',
     'CSSPrimitiveValue.webidl',
     'CSSStyleDeclaration.webidl',
     'CSSStyleSheet.webidl',
     'CSSValue.webidl',
     'CSSValueList.webidl',
     'DataContainerEvent.webidl',
-    'DataStore.webidl',
     'DelayNode.webidl',
     'DesktopNotification.webidl',
     'DeviceMotionEvent.webidl',
     'DeviceStorage.webidl',
     'Document.webidl',
     'DocumentFragment.webidl',
     'DocumentType.webidl',
     'DOMCursor.webidl',
@@ -538,10 +537,9 @@ if CONFIG['ENABLE_TESTS']:
 
 if CONFIG['MOZ_B2G']:
     WEBIDL_FILES += [
         'InputMethod.webidl',
     ]
 
 GENERATED_EVENTS_WEBIDL_FILES = [
     'BlobEvent.webidl',
-    'DataStoreChangeEvent.webidl',
 ]
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -579,12 +579,8 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DL
 @BINPATH@/components/browsercomps.xpt
 
 #ifdef ENABLE_MARIONETTE
 @BINPATH@/chrome/marionette@JAREXT@ 
 @BINPATH@/chrome/marionette.manifest
 @BINPATH@/components/MarionetteComponents.manifest
 @BINPATH@/components/marionettecomponent.js
 #endif
-
-@BINPATH@/components/DataStore.manifest
-@BINPATH@/components/DataStoreService.js
-@BINPATH@/components/dom_datastore.xpt
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -4396,11 +4396,8 @@ pref("captivedetect.pollingTime", 3000);
 pref("captivedetect.maxRetryCount", 5);
 #endif
 
 #ifdef RELEASE_BUILD
 pref("dom.forms.inputmode", false);
 #else
 pref("dom.forms.inputmode", true);
 #endif
-
-// DataStore is disabled by default
-pref("dom.datastore.enabled", false);
--- a/widget/gonk/libui/InputDispatcher.cpp
+++ b/widget/gonk/libui/InputDispatcher.cpp
@@ -42,17 +42,17 @@
 #define DEBUG_APP_SWITCH 0
 
 // Log debug messages about hover events.
 #define DEBUG_HOVER 0
 
 #include "InputDispatcher.h"
 
 #include "Trace.h"
-#include "mozilla/dom/PowerManager.h"
+#include "PowerManager.h"
 
 #include <stddef.h>
 #include <unistd.h>
 #include <errno.h>
 #include <limits.h>
 #include <time.h>
 
 #define INDENT "  "