Skip to content

Commit

Permalink
Backed out changeset 3986762b88a3 (bug 871445) for failures in test_a…
Browse files Browse the repository at this point in the history
…pp_install.html
  • Loading branch information
Ed Morley committed Oct 2, 2013
1 parent 6c71681 commit 5b2269d
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 501 deletions.
2 changes: 0 additions & 2 deletions b2g/app/b2g.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,6 @@ pref("network.sntp.timeout", 30); // In seconds.
// Enable promise
pref("dom.promise.enabled", false);

pref("dom.datastore.enabled", true);

// DOM Inter-App Communication API.
#ifdef MOZ_WIDGET_GONK
// Enable this only for gonk-specific build but not for desktop build.
Expand Down
4 changes: 0 additions & 4 deletions b2g/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,6 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@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
Expand Down
5 changes: 0 additions & 5 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -816,11 +816,6 @@ bin/libfreebl_32int64_3.so
@BINPATH@/metro/modules
#endif

@BINPATH@/components/DataStore.manifest
@BINPATH@/components/DataStoreService.js
@BINPATH@/components/dom_datastore.xpt


#ifdef MOZ_ASAN
@BINPATH@/llvm-symbolizer
#endif
43 changes: 1 addition & 42 deletions dom/apps/src/Webapps.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ XPCOMUtils.defineLazyGetter(this, "interAppCommService", function() {
.getService(Ci.nsIInterAppCommService);
});

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);
Expand Down Expand Up @@ -276,19 +272,6 @@ this.DOMApplicationRegistry = {
}
},

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].manifest);
}).bind(this));
},

updatePermissionsForApp: function updatePermissionsForApp(aId) {
if (!this.webapps[aId]) {
return;
Expand Down Expand Up @@ -530,7 +513,6 @@ this.DOMApplicationRegistry = {
}
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.
Expand All @@ -552,20 +534,6 @@ this.DOMApplicationRegistry = {
}).bind(this));
},

updateDataStore: function(aId, aManifestURL, aManifest) {
if (!("datastores" in aManifest)) {
return;
}

for (let name in aManifest.datastores) {
let readonly = ("readonly" in aManifest.datastores[name]) &&
!aManifest.datastores[name].readonly
? false : true;

dataStoreService.installDataStore(aId, name, aManifestURL, readonly);
}
},

// |aEntryPoint| is either the entry_point name or the null in which case we
// use the root of the manifest.
//
Expand Down Expand Up @@ -1424,7 +1392,7 @@ this.DOMApplicationRegistry = {
manifestURL: app.manifestURL },
true);
}
this.updateDataStore(this.webapps[id].localId, app.manifestURL, aData);

this.broadcastMessage("Webapps:PackageEvent",
{ type: "applied",
manifestURL: app.manifestURL,
Expand Down Expand Up @@ -1630,8 +1598,6 @@ this.DOMApplicationRegistry = {
}, true);
}

this.updateDataStore(this.webapps[id].localId, app.manifestURL, app.manifest);

app.name = manifest.name;
app.csp = manifest.csp || "";
app.role = manifest.role || "";
Expand Down Expand Up @@ -2131,10 +2097,6 @@ this.DOMApplicationRegistry = {
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",
Expand Down Expand Up @@ -2237,9 +2199,6 @@ this.DOMApplicationRegistry = {
this.uninstall(aData, aData.mm);
}).bind(this));
}

this.updateDataStore(this.webapps[id].localId, this.webapps[id].manifestURL,
jsonManifest);
}

["installState", "downloadAvailable",
Expand Down
24 changes: 0 additions & 24 deletions dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,11 @@
#endif

#include "nsIDOMGlobalPropertyInitializer.h"
#include "nsIDataStoreService.h"
#include "nsJSUtils.h"

#include "nsScriptNameSpaceManager.h"

#include "mozilla/dom/NavigatorBinding.h"
#include "mozilla/dom/Promise.h"

namespace mozilla {
namespace dom {
Expand Down Expand Up @@ -1097,28 +1095,6 @@ Navigator::GetBattery(ErrorResult& aRv)
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*
Navigator::GetMozPower(ErrorResult& aRv)
{
Expand Down
4 changes: 0 additions & 4 deletions dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ class BatteryManager;
class FMRadio;
#endif

class Promise;

class DesktopNotificationCenter;
class MobileMessageManager;
class MozIdleObserver;
Expand Down Expand Up @@ -177,8 +175,6 @@ class Navigator : public nsIDOMNavigator
// The XPCOM GetDoNotTrack is ok
Geolocation* GetGeolocation(ErrorResult& aRv);
battery::BatteryManager* GetBattery(ErrorResult& aRv);
already_AddRefed<Promise> GetDataStores(const nsAString &aName,
ErrorResult& aRv);
bool Vibrate(uint32_t aDuration);
bool Vibrate(const nsTArray<uint32_t>& aDuration);
void GetAppCodeName(nsString& aAppCodeName, ErrorResult& aRv)
Expand Down
63 changes: 0 additions & 63 deletions dom/datastore/DataStore.jsm

This file was deleted.

2 changes: 0 additions & 2 deletions dom/datastore/DataStore.manifest

This file was deleted.

115 changes: 0 additions & 115 deletions dom/datastore/DataStoreService.js

This file was deleted.

24 changes: 0 additions & 24 deletions dom/datastore/moz.build

This file was deleted.

Loading

0 comments on commit 5b2269d

Please sign in to comment.