Bug 1600454 - Fix build with --disable-webspeech. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D55365

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-12-01 01:30:11 +00:00
Родитель 6c9a57794d
Коммит 073b138dcb
6 изменённых файлов: 18 добавлений и 26 удалений

Просмотреть файл

@ -2254,22 +2254,16 @@ bool ContentChild::DeallocPBenchmarkStorageChild(
return true;
}
PSpeechSynthesisChild* ContentChild::AllocPSpeechSynthesisChild() {
#ifdef MOZ_WEBSPEECH
PSpeechSynthesisChild* ContentChild::AllocPSpeechSynthesisChild() {
MOZ_CRASH("No one should be allocating PSpeechSynthesisChild actors");
#else
return nullptr;
#endif
}
bool ContentChild::DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor) {
#ifdef MOZ_WEBSPEECH
delete aActor;
return true;
#else
return false;
#endif
}
#endif
PWebrtcGlobalChild* ContentChild::AllocPWebrtcGlobalChild() {
#ifdef MOZ_WEBRTC

Просмотреть файл

@ -290,9 +290,10 @@ class ContentChild final : public PContentChild,
mozilla::ipc::IPCResult RecvNotifyEmptyHTTPCache();
#ifdef MOZ_WEBSPEECH
PSpeechSynthesisChild* AllocPSpeechSynthesisChild();
bool DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor);
#endif
mozilla::ipc::IPCResult RecvRegisterChrome(
nsTArray<ChromePackage>&& packages,

Просмотреть файл

@ -3798,35 +3798,25 @@ mozilla::ipc::IPCResult ContentParent::RecvPPresentationConstructor(
return IPC_OK();
}
PSpeechSynthesisParent* ContentParent::AllocPSpeechSynthesisParent() {
#ifdef MOZ_WEBSPEECH
PSpeechSynthesisParent* ContentParent::AllocPSpeechSynthesisParent() {
return new mozilla::dom::SpeechSynthesisParent();
#else
return nullptr;
#endif
}
bool ContentParent::DeallocPSpeechSynthesisParent(
PSpeechSynthesisParent* aActor) {
#ifdef MOZ_WEBSPEECH
delete aActor;
return true;
#else
return false;
#endif
}
mozilla::ipc::IPCResult ContentParent::RecvPSpeechSynthesisConstructor(
PSpeechSynthesisParent* aActor) {
#ifdef MOZ_WEBSPEECH
if (!static_cast<SpeechSynthesisParent*>(aActor)->SendInit()) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
#else
return IPC_FAIL_NO_REASON(this);
#endif
}
#endif
mozilla::ipc::IPCResult ContentParent::RecvStartVisitedQueries(
const nsTArray<URIParams>& aUris) {

Просмотреть файл

@ -920,12 +920,13 @@ class ContentParent final : public PContentParent,
virtual mozilla::ipc::IPCResult RecvPPresentationConstructor(
PPresentationParent* aActor) override;
#ifdef MOZ_WEBSPEECH
PSpeechSynthesisParent* AllocPSpeechSynthesisParent();
bool DeallocPSpeechSynthesisParent(PSpeechSynthesisParent* aActor);
virtual mozilla::ipc::IPCResult RecvPSpeechSynthesisConstructor(
PSpeechSynthesisParent* aActor) override;
#endif
PWebBrowserPersistDocumentParent* AllocPWebBrowserPersistDocumentParent(
PBrowserParent* aBrowser, const uint64_t& aOuterWindowID);

Просмотреть файл

@ -31,7 +31,9 @@ include protocol PPrinting;
include protocol PChildToParentStream;
include protocol PParentToChildStream;
include protocol POfflineCacheUpdate;
#ifdef MOZ_WEBSPEECH
include protocol PSpeechSynthesis;
#endif
include protocol PTestShell;
include protocol PJavaScript;
include protocol PRemoteSpellcheckEngine;
@ -361,7 +363,9 @@ nested(upto inside_cpow) sync protocol PContent
manages PPrinting;
manages PChildToParentStream;
manages PParentToChildStream;
#ifdef MOZ_WEBSPEECH
manages PSpeechSynthesis;
#endif
manages PTestShell;
manages PJavaScript;
manages PRemoteSpellcheckEngine;
@ -899,7 +903,9 @@ parent:
async PChildToParentStream();
#ifdef MOZ_WEBSPEECH
async PSpeechSynthesis();
#endif
async PMedia();

Просмотреть файл

@ -57,10 +57,10 @@ if CONFIG['MOZ_WEBSPEECH']:
if CONFIG['MOZ_SYNTH_SPEECHD']:
DIRS += ['speechd']
IPDL_SOURCES += [
IPDL_SOURCES += [
'ipc/PSpeechSynthesis.ipdl',
'ipc/PSpeechSynthesisRequest.ipdl',
]
]
include('/ipc/chromium/chromium-config.mozbuild')