summarylogtreecommitdiffstats
path: root/disable-synth-dammit.patch
blob: e35a214241a87420e0995223bea08a6b6d62dfc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
index 9b5ce2d42697..d6c9f3a3a333 100644
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -2131,22 +2131,16 @@ bool ContentChild::DeallocPMediaChild(media::PMediaChild* aActor) {
   return media::DeallocPMediaChild(aActor);
 }
 
-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
diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h
index f1f90e4aed06..eea1a906155b 100644
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -301,9 +301,11 @@ class ContentChild final : public PContentChild,
 
   mozilla::ipc::IPCResult RecvNotifyEmptyHTTPCache();
 
+#ifdef MOZ_WEBSPEECH
   PSpeechSynthesisChild* AllocPSpeechSynthesisChild();
 
   bool DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor);
+#endif
 
   mozilla::ipc::IPCResult RecvRegisterChrome(
       InfallibleTArray<ChromePackage>&& packages,
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index eb67685972b2..866245ebe432 100644
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -3699,35 +3699,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::RecvStartVisitedQuery(
     const URIParams& aURI) {
diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h
index 416ae2f7bf4d..34ce13d1a4f5 100644
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -918,12 +918,14 @@ 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);
diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl
index 141c75af96e7..708360237696 100644
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -31,7 +31,7 @@ include protocol PPrinting;
 include protocol PChildToParentStream;
 include protocol PParentToChildStream;
 include protocol POfflineCacheUpdate;
-include protocol PSpeechSynthesis;
+/*include protocol PSpeechSynthesis;*/
 include protocol PTestShell;
 include protocol PJavaScript;
 include protocol PRemoteSpellcheckEngine;
@@ -343,7 +343,7 @@ nested(upto inside_cpow) sync protocol PContent
     manages PPrinting;
     manages PChildToParentStream;
     manages PParentToChildStream;
-    manages PSpeechSynthesis;
+/*    manages PSpeechSynthesis;*/
     manages PTestShell;
     manages PJavaScript;
     manages PRemoteSpellcheckEngine;
@@ -860,7 +860,7 @@ parent:
 
     async PChildToParentStream();
 
-    async PSpeechSynthesis();
+    /*async PSpeechSynthesis();*/
 
     async PMedia();
 
diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build
index fe4cfe7a7426..62daca2a85ae 100644
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -151,6 +151,11 @@ if CONFIG['MOZ_SANDBOX'] and (CONFIG['OS_TARGET'] in ['Darwin', 'Linux']):
         'mozsandbox',
     ]
 
+if CONFIG['MOZ_WEBSPEECH']:
+    LOCAL_INCLUDES += [
+        '/dom/media/webspeech/synth/ipc'
+    ]
+
 LOCAL_INCLUDES += [
     '/caps',
     '/chrome',
@@ -160,7 +165,6 @@ LOCAL_INCLUDES += [
     '/dom/events',
     '/dom/filesystem',
     '/dom/geolocation',
-    '/dom/media/webspeech/synth/ipc',
     '/dom/security',
     '/dom/storage',
     '/extensions/permissions',
diff --git a/dom/media/webspeech/moz.build b/dom/media/webspeech/moz.build
index 85e2277b388b..1eb7dd199287 100644
--- a/dom/media/webspeech/moz.build
+++ b/dom/media/webspeech/moz.build
@@ -3,7 +3,8 @@
 # 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/.
 
-DIRS = ['synth']
+if CONFIG['MOZ_SYNTH_SPEECHD']:
+    DIRS = ['synth']
 
-if CONFIG['MOZ_WEBSPEECH']:
-    DIRS += ['recognition']
+    if CONFIG['MOZ_WEBSPEECH']:
+        DIRS += ['recognition']
diff --git a/ipc/ipdl/ipdl/direct_call.py b/ipc/ipdl/ipdl/direct_call.py
index 77f75f8b2813..97fcea5320e3 100644
--- a/ipc/ipdl/ipdl/direct_call.py
+++ b/ipc/ipdl/ipdl/direct_call.py
@@ -553,8 +553,8 @@ VIRTUAL_CALL_CLASSES = set([
     ("PPluginWidget", "parent"),
     ("PProfiler", "child"),
     ("PProfiler", "parent"),
-    ("PSpeechSynthesisRequest", "child"),
-    ("PSpeechSynthesisRequest", "parent"),
+    #("PSpeechSynthesisRequest", "child"),
+    #("PSpeechSynthesisRequest", "parent"),
     ("PStunAddrsRequest", "child"),
     ("PStunAddrsRequest", "parent"),
     ("PWebrtcProxyChannel", "child"),