mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1765610 - Add missing check of gamepad testing pref r=dveditz,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D145805
This commit is contained in:
parent
66144974a5
commit
7d35776a8b
@ -8,11 +8,17 @@
|
||||
|
||||
#include "mozilla/dom/GamepadPlatformService.h"
|
||||
#include "mozilla/ipc/BackgroundParent.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
namespace mozilla::dom {
|
||||
|
||||
already_AddRefed<GamepadTestChannelParent> GamepadTestChannelParent::Create() {
|
||||
// Refuse to create the parent actor if this pref is disabled
|
||||
if (!StaticPrefs::dom_gamepad_test_enabled()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return RefPtr<GamepadTestChannelParent>(new GamepadTestChannelParent())
|
||||
.forget();
|
||||
}
|
||||
|
@ -2329,7 +2329,7 @@
|
||||
mirror: always
|
||||
|
||||
- name: dom.gamepad.test.enabled
|
||||
type: bool
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user