diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-06 19:47:29 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-06 19:47:29 -0500 |
commit | 6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c (patch) | |
tree | f5e4fdfaa9be98d15ee7e5e0d8265ed461dfd55f /dom/base/Navigator.cpp | |
parent | 5483f807c2663be8c63caf8d59ee151b3ef499d3 (diff) | |
download | UXP-6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c.tar UXP-6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c.tar.gz UXP-6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c.tar.lz UXP-6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c.tar.xz UXP-6da9e3c6b9aa7e0be236a6f5c4f9498c25a08c3c.zip |
Issue #1395 - Remove FlyWeb Service
Diffstat (limited to 'dom/base/Navigator.cpp')
-rw-r--r-- | dom/base/Navigator.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 1433f3257..a544f23c1 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -37,8 +37,6 @@ #include "mozilla/dom/PowerManager.h" #include "mozilla/dom/WakeLock.h" #include "mozilla/dom/power/PowerManagerService.h" -#include "mozilla/dom/FlyWebPublishedServer.h" -#include "mozilla/dom/FlyWebService.h" #include "mozilla/dom/Permissions.h" #include "mozilla/dom/ServiceWorkerContainer.h" #include "mozilla/dom/StorageManager.h" @@ -1356,41 +1354,6 @@ Navigator::GetBattery(ErrorResult& aRv) return mBatteryPromise; } -already_AddRefed<Promise> -Navigator::PublishServer(const nsAString& aName, - const FlyWebPublishOptions& aOptions, - ErrorResult& aRv) -{ - RefPtr<FlyWebService> service = FlyWebService::GetOrCreate(); - if (!service) { - aRv.Throw(NS_ERROR_FAILURE); - return nullptr; - } - - RefPtr<FlyWebPublishPromise> mozPromise = - service->PublishServer(aName, aOptions, mWindow); - MOZ_ASSERT(mozPromise); - - nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow); - ErrorResult result; - RefPtr<Promise> domPromise = Promise::Create(global, result); - if (result.Failed()) { - aRv.Throw(NS_ERROR_FAILURE); - return nullptr; - } - - mozPromise->Then(AbstractThread::MainThread(), - __func__, - [domPromise] (FlyWebPublishedServer* aServer) { - domPromise->MaybeResolve(aServer); - }, - [domPromise] (nsresult aStatus) { - domPromise->MaybeReject(aStatus); - }); - - return domPromise.forget(); -} - PowerManager* Navigator::GetMozPower(ErrorResult& aRv) { |