mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1809697 - Re-allow the gamepad test service in fuzzing builds. r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D166591
This commit is contained in:
parent
97f2acbb17
commit
3e6999e839
@ -29,6 +29,9 @@
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StaticPrefs_dom.h"
|
||||
#ifdef FUZZING
|
||||
# include "mozilla/StaticPrefs_fuzzing.h"
|
||||
#endif
|
||||
#include "mozilla/StaticPrefs_media.h"
|
||||
#include "mozilla/StaticPrefs_network.h"
|
||||
#include "mozilla/StaticPrefs_pdfjs.h"
|
||||
@ -1597,10 +1600,17 @@ void Navigator::GetGamepads(nsTArray<RefPtr<Gamepad>>& aGamepads,
|
||||
}
|
||||
|
||||
GamepadServiceTest* Navigator::RequestGamepadServiceTest(ErrorResult& aRv) {
|
||||
#ifdef FUZZING
|
||||
if (!StaticPrefs::fuzzing_enabled()) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
#else
|
||||
if (!xpc::IsInAutomation()) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mGamepadServiceTest) {
|
||||
mGamepadServiceTest = GamepadServiceTest::CreateTestService(mWindow);
|
||||
|
Loading…
Reference in New Issue
Block a user