mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset bdaede62fdcf (bug 1169653) for introducing new rooting hazards.
CLOSED TREE
This commit is contained in:
parent
9927b181f7
commit
e9a898208f
@ -9,7 +9,6 @@
|
|||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
|
|
||||||
#include "mozilla/dom/BindingUtils.h"
|
|
||||||
#include "mozilla/dom/SpeechRecognitionBinding.h"
|
#include "mozilla/dom/SpeechRecognitionBinding.h"
|
||||||
#include "mozilla/dom/MediaStreamTrackBinding.h"
|
#include "mozilla/dom/MediaStreamTrackBinding.h"
|
||||||
#include "mozilla/dom/MediaStreamError.h"
|
#include "mozilla/dom/MediaStreamError.h"
|
||||||
@ -144,15 +143,6 @@ SpeechRecognition::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||||||
return SpeechRecognitionBinding::Wrap(aCx, this, aGivenProto);
|
return SpeechRecognitionBinding::Wrap(aCx, this, aGivenProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
SpeechRecognition::IsAuthorized(JSContext* aCx, JSObject* aGlobal)
|
|
||||||
{
|
|
||||||
bool enableTests = Preferences::GetBool(TEST_PREFERENCE_ENABLE);
|
|
||||||
bool enableRecognitionEnable = Preferences::GetBool(TEST_PREFERENCE_RECOGNITION_ENABLE);
|
|
||||||
bool enableRecognitionForceEnable = Preferences::GetBool(TEST_PREFERENCE_RECOGNITION_FORCE_ENABLE);
|
|
||||||
return (IsInCertifiedApp(aCx, aGlobal) || enableRecognitionForceEnable || enableTests) && enableRecognitionEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<SpeechRecognition>
|
already_AddRefed<SpeechRecognition>
|
||||||
SpeechRecognition::Constructor(const GlobalObject& aGlobal,
|
SpeechRecognition::Constructor(const GlobalObject& aGlobal,
|
||||||
ErrorResult& aRv)
|
ErrorResult& aRv)
|
||||||
|
@ -38,8 +38,6 @@ namespace dom {
|
|||||||
#define TEST_PREFERENCE_ENABLE "media.webspeech.test.enable"
|
#define TEST_PREFERENCE_ENABLE "media.webspeech.test.enable"
|
||||||
#define TEST_PREFERENCE_FAKE_FSM_EVENTS "media.webspeech.test.fake_fsm_events"
|
#define TEST_PREFERENCE_FAKE_FSM_EVENTS "media.webspeech.test.fake_fsm_events"
|
||||||
#define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service"
|
#define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service"
|
||||||
#define TEST_PREFERENCE_RECOGNITION_ENABLE "media.webspeech.recognition.enable"
|
|
||||||
#define TEST_PREFERENCE_RECOGNITION_FORCE_ENABLE "media.webspeech.recognition.force_enable"
|
|
||||||
#define SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC "SpeechRecognitionTest:RequestEvent"
|
#define SPEECH_RECOGNITION_TEST_EVENT_REQUEST_TOPIC "SpeechRecognitionTest:RequestEvent"
|
||||||
#define SPEECH_RECOGNITION_TEST_END_TOPIC "SpeechRecognitionTest:End"
|
#define SPEECH_RECOGNITION_TEST_END_TOPIC "SpeechRecognitionTest:End"
|
||||||
|
|
||||||
@ -67,8 +65,6 @@ public:
|
|||||||
|
|
||||||
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
|
||||||
static bool IsAuthorized(JSContext* aCx, JSObject* aGlobal);
|
|
||||||
|
|
||||||
static already_AddRefed<SpeechRecognition>
|
static already_AddRefed<SpeechRecognition>
|
||||||
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
|
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
|
||||||
|
|
||||||
|
@ -938,6 +938,22 @@ var interfaceNamesInGlobalScope =
|
|||||||
{name: "SourceBuffer", linux: false, release: false},
|
{name: "SourceBuffer", linux: false, release: false},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "SourceBufferList", linux: false, release: false},
|
{name: "SourceBufferList", linux: false, release: false},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognition", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognitionError", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognitionAlternative", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognitionResult", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognitionResultList", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechRecognitionEvent", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechGrammar", b2g: true, nightly: true},
|
||||||
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
{name: "SpeechGrammarList", b2g: true, nightly: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
{name: "SpeechSynthesisEvent", b2g: true},
|
{name: "SpeechSynthesisEvent", b2g: true},
|
||||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor,
|
[Constructor,
|
||||||
Pref="media.webspeech.recognition.enable",
|
Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechGrammar {
|
interface SpeechGrammar {
|
||||||
[Throws]
|
[Throws]
|
||||||
attribute DOMString src;
|
attribute DOMString src;
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor, Pref="media.webspeech.recognition.enable",
|
[Constructor, Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechGrammarList {
|
interface SpeechGrammarList {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor,
|
[Constructor,
|
||||||
Pref="media.webspeech.recognition.enable",
|
Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechRecognition : EventTarget {
|
interface SpeechRecognition : EventTarget {
|
||||||
// recognition parameters
|
// recognition parameters
|
||||||
[Throws]
|
[Throws]
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Pref="media.webspeech.recognition.enable",
|
[Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechRecognitionAlternative {
|
interface SpeechRecognitionAlternative {
|
||||||
readonly attribute DOMString transcript;
|
readonly attribute DOMString transcript;
|
||||||
readonly attribute float confidence;
|
readonly attribute float confidence;
|
||||||
|
@ -16,7 +16,6 @@ enum SpeechRecognitionErrorCode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
[Pref="media.webspeech.recognition.enable",
|
[Pref="media.webspeech.recognition.enable",
|
||||||
Func="SpeechRecognition::IsAuthorized",
|
|
||||||
Constructor(DOMString type, optional SpeechRecognitionErrorInit eventInitDict)]
|
Constructor(DOMString type, optional SpeechRecognitionErrorInit eventInitDict)]
|
||||||
interface SpeechRecognitionError : Event
|
interface SpeechRecognitionError : Event
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
interface nsISupports;
|
interface nsISupports;
|
||||||
|
|
||||||
[Pref="media.webspeech.recognition.enable",
|
[Pref="media.webspeech.recognition.enable",
|
||||||
Func="SpeechRecognition::IsAuthorized",
|
|
||||||
Constructor(DOMString type, optional SpeechRecognitionEventInit eventInitDict)]
|
Constructor(DOMString type, optional SpeechRecognitionEventInit eventInitDict)]
|
||||||
interface SpeechRecognitionEvent : Event
|
interface SpeechRecognitionEvent : Event
|
||||||
{
|
{
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Pref="media.webspeech.recognition.enable",
|
[Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechRecognitionResult {
|
interface SpeechRecognitionResult {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
getter SpeechRecognitionAlternative item(unsigned long index);
|
getter SpeechRecognitionAlternative item(unsigned long index);
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
* liability, trademark and document use rules apply.
|
* liability, trademark and document use rules apply.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Pref="media.webspeech.recognition.enable",
|
[Pref="media.webspeech.recognition.enable"]
|
||||||
Func="SpeechRecognition::IsAuthorized"]
|
|
||||||
interface SpeechRecognitionResultList {
|
interface SpeechRecognitionResultList {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
getter SpeechRecognitionResult item(unsigned long index);
|
getter SpeechRecognitionResult item(unsigned long index);
|
||||||
|
Loading…
Reference in New Issue
Block a user