Skip to content

Commit

Permalink
Issue #1395 - Remove FlyWeb Service
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt A. Tobin committed Feb 7, 2020
1 parent 5483f80 commit 6da9e3c
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 244 deletions.
37 changes: 0 additions & 37 deletions dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand Down
5 changes: 0 additions & 5 deletions dom/base/Navigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class WakeLock;
class ArrayBufferViewOrBlobOrStringOrFormData;
class ServiceWorkerContainer;
class DOMRequest;
struct FlyWebPublishOptions;
struct FlyWebFilter;
} // namespace dom
} // namespace mozilla

Expand Down Expand Up @@ -140,9 +138,6 @@ class Navigator final : public nsIDOMNavigator
Geolocation* GetGeolocation(ErrorResult& aRv);
Promise* GetBattery(ErrorResult& aRv);

already_AddRefed<Promise> PublishServer(const nsAString& aName,
const FlyWebPublishOptions& aOptions,
ErrorResult& aRv);
static void AppName(nsAString& aAppName, bool aUsePrefOverriddenValue);

static nsresult GetPlatform(nsAString& aPlatform,
Expand Down
8 changes: 0 additions & 8 deletions dom/base/nsDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
#include "mozilla/dom/HTMLIFrameElement.h"
#include "mozilla/dom/HTMLImageElement.h"
#include "mozilla/dom/MediaSource.h"
#include "mozilla/dom/FlyWebService.h"

#include "mozAutoDocUpdate.h"
#include "nsGlobalWindow.h"
Expand Down Expand Up @@ -8453,13 +8452,6 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
return false;
}

// Don't save presentation if there are active FlyWeb connections or FlyWeb
// servers.
FlyWebService* flyWebService = FlyWebService::GetExisting();
if (flyWebService && flyWebService->HasConnectionOrServer(win->WindowID())) {
return false;
}

if (mSubDocuments) {
for (auto iter = mSubDocuments->Iter(); !iter.Done(); iter.Next()) {
auto entry = static_cast<SubDocMapEntry*>(iter.Get());
Expand Down
8 changes: 0 additions & 8 deletions dom/bindings/Bindings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,6 @@ DOMInterfaces = {
'wrapperCache': False,
},

'FlyWebFetchEvent': {
'headerFile': 'FlyWebServerEvents.h',
},

'FlyWebWebSocketEvent': {
'headerFile': 'FlyWebServerEvents.h',
},

'FontFaceSet': {
'implicitJSContext': [ 'load' ],
},
Expand Down
4 changes: 0 additions & 4 deletions dom/events/test/test_all_synthetic_events.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@
return new ErrorEvent(aName, aProps);
},
},
FlyWebFetchEvent: { create: null, // Cannot create untrusted event from JS.
},
FlyWebWebSocketEvent: { create: null, // Cannot create untrusted event from JS.
},
FocusEvent: { create: function (aName, aProps) {
return new FocusEvent(aName, aProps);
},
Expand Down
17 changes: 0 additions & 17 deletions dom/ipc/ContentChild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "mozilla/dom/DataTransfer.h"
#include "mozilla/dom/DOMStorageIPC.h"
#include "mozilla/dom/ExternalHelperAppChild.h"
#include "mozilla/dom/FlyWebPublishedServerIPC.h"
#include "mozilla/dom/GetFilesHelper.h"
#include "mozilla/dom/ProcessGlobal.h"
#include "mozilla/dom/PushNotifier.h"
Expand Down Expand Up @@ -1415,22 +1414,6 @@ ContentChild::SendPBlobConstructor(PBlobChild* aActor,
return PContentChild::SendPBlobConstructor(aActor, aParams);
}

PFlyWebPublishedServerChild*
ContentChild::AllocPFlyWebPublishedServerChild(const nsString& name,
const FlyWebPublishOptions& params)
{
MOZ_CRASH("We should never be manually allocating PFlyWebPublishedServerChild actors");
return nullptr;
}

bool
ContentChild::DeallocPFlyWebPublishedServerChild(PFlyWebPublishedServerChild* aActor)
{
RefPtr<FlyWebPublishedServerChild> actor =
dont_AddRef(static_cast<FlyWebPublishedServerChild*>(aActor));
return true;
}

bool
ContentChild::RecvNotifyEmptyHTTPCache()
{
Expand Down
6 changes: 0 additions & 6 deletions dom/ipc/ContentChild.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,6 @@ class ContentChild final : public PContentChild

virtual bool DeallocPStorageChild(PStorageChild* aActor) override;

virtual PFlyWebPublishedServerChild*
AllocPFlyWebPublishedServerChild(const nsString& name,
const FlyWebPublishOptions& params) override;

virtual bool DeallocPFlyWebPublishedServerChild(PFlyWebPublishedServerChild* aActor) override;

virtual bool RecvNotifyEmptyHTTPCache() override;

virtual PSpeechSynthesisChild* AllocPSpeechSynthesisChild() override;
Expand Down
18 changes: 0 additions & 18 deletions dom/ipc/ContentParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include "mozilla/dom/power/PowerManagerService.h"
#include "mozilla/dom/Permissions.h"
#include "mozilla/dom/PushNotifier.h"
#include "mozilla/dom/FlyWebPublishedServerIPC.h"
#include "mozilla/dom/quota/QuotaManagerService.h"
#include "mozilla/dom/time/DateCacheCleaner.h"
#include "mozilla/embedding/printingui/PrintingParent.h"
Expand Down Expand Up @@ -3104,23 +3103,6 @@ ContentParent::DeallocPStorageParent(PStorageParent* aActor)
return true;
}

PFlyWebPublishedServerParent*
ContentParent::AllocPFlyWebPublishedServerParent(const nsString& name,
const FlyWebPublishOptions& params)
{
RefPtr<FlyWebPublishedServerParent> actor =
new FlyWebPublishedServerParent(name, params);
return actor.forget().take();
}

bool
ContentParent::DeallocPFlyWebPublishedServerParent(PFlyWebPublishedServerParent* aActor)
{
RefPtr<FlyWebPublishedServerParent> actor =
dont_AddRef(static_cast<FlyWebPublishedServerParent*>(aActor));
return true;
}

PSpeechSynthesisParent*
ContentParent::AllocPSpeechSynthesisParent()
{
Expand Down
6 changes: 0 additions & 6 deletions dom/ipc/ContentParent.h
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,6 @@ class ContentParent final : public PContentParent

virtual bool DeallocPStorageParent(PStorageParent* aActor) override;

virtual PFlyWebPublishedServerParent*
AllocPFlyWebPublishedServerParent(const nsString& name,
const FlyWebPublishOptions& params) override;

virtual bool DeallocPFlyWebPublishedServerParent(PFlyWebPublishedServerParent* aActor) override;

virtual PSpeechSynthesisParent* AllocPSpeechSynthesisParent() override;

virtual bool
Expand Down
5 changes: 0 additions & 5 deletions dom/ipc/PContent.ipdl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ include protocol PRemoteSpellcheckEngine;
include protocol PWebBrowserPersistDocument;
include protocol PWebrtcGlobal;
include protocol PVideoDecoderManager;
include protocol PFlyWebPublishedServer;
include DOMTypes;
include JavaScriptTypes;
include InputStreamParams;
Expand Down Expand Up @@ -87,7 +86,6 @@ using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/Structu
using mozilla::DataStorageType from "ipc/DataStorageIPCUtils.h";
using mozilla::DocShellOriginAttributes from "mozilla/ipc/BackgroundUtils.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using struct mozilla::dom::FlyWebPublishOptions from "mozilla/dom/FlyWebPublishOptionsIPCSerializer.h";

union ChromeRegistryItem
{
Expand Down Expand Up @@ -259,7 +257,6 @@ nested(upto inside_cpow) sync protocol PContent
manages PRemoteSpellcheckEngine;
manages PWebBrowserPersistDocument;
manages PWebrtcGlobal;
manages PFlyWebPublishedServer;

both:
// Depending on exactly how the new browser is being created, it might be
Expand Down Expand Up @@ -668,8 +665,6 @@ parent:

async PWebrtcGlobal();

async PFlyWebPublishedServer(nsString name, FlyWebPublishOptions params);

// Services remoting

async StartVisitedQuery(URIParams uri);
Expand Down
1 change: 0 additions & 1 deletion dom/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ DIRS += [
'fetch',
'filehandle',
'filesystem',
'flyweb',
'gamepad',
'geolocation',
'grid',
Expand Down
39 changes: 0 additions & 39 deletions dom/webidl/FlyWebDiscoveryManager.webidl

This file was deleted.

13 changes: 0 additions & 13 deletions dom/webidl/FlyWebFetchEvent.webidl

This file was deleted.

23 changes: 0 additions & 23 deletions dom/webidl/FlyWebPublish.webidl

This file was deleted.

16 changes: 0 additions & 16 deletions dom/webidl/FlyWebWebSocketEvent.webidl

This file was deleted.

6 changes: 0 additions & 6 deletions dom/webidl/Navigator.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ partial interface Navigator {
Promise<BatteryManager> getBattery();
};

partial interface Navigator {
[NewObject, Pref="dom.flyweb.enabled"]
Promise<FlyWebPublishedServer> publishServer(DOMString name,
optional FlyWebPublishOptions options);
};

// http://www.w3.org/TR/vibration/#vibration-interface
partial interface Navigator {
// We don't support sequences in unions yet
Expand Down
4 changes: 0 additions & 4 deletions dom/webidl/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ WEBIDL_FILES = [
'FileSystemDirectoryReader.webidl',
'FileSystemEntry.webidl',
'FileSystemFileEntry.webidl',
'FlyWebDiscoveryManager.webidl',
'FlyWebFetchEvent.webidl',
'FlyWebPublish.webidl',
'FlyWebWebSocketEvent.webidl',
'FocusEvent.webidl',
'FontFace.webidl',
'FontFaceSet.webidl',
Expand Down
Loading

0 comments on commit 6da9e3c

Please sign in to comment.