mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1160844 - Only initialize pico tts when not in mochitest and speech synth is enabled. r=smaug
This commit is contained in:
parent
da86cbdc59
commit
ddfe6e8d53
@ -17,7 +17,7 @@
|
||||
#include "nsIFile.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
@ -453,6 +453,11 @@ nsPicoService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
NS_ENSURE_TRUE(!strcmp(aTopic, "profile-after-change"), NS_ERROR_UNEXPECTED);
|
||||
|
||||
if (!Preferences::GetBool("media.webspeech.synth.enabled") ||
|
||||
Preferences::GetBool("media.webspeech.synth.test")) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
DebugOnly<nsresult> rv = NS_NewNamedThread("Pico Worker", getter_AddRefs(mThread));
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
return mThread->Dispatch(
|
||||
|
@ -318,3 +318,6 @@ user_pref("browser.devedition.theme.enabled", false);
|
||||
|
||||
// Disable periodic updates of service workers.
|
||||
user_pref("dom.serviceWorkers.periodic-updates.enabled", false);
|
||||
|
||||
// Enable speech synth test service, and disable built in platform services.
|
||||
user_pref("media.webspeech.synth.test", true);
|
||||
|
Loading…
Reference in New Issue
Block a user