mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1348028 - Implement fuzzPriv.enableAccessibility() in FuzzingFunctions r=smaug,surkov
This enables accessibility until the next GC, which is also how fuzzPriv worked.
This commit is contained in:
parent
8b9701dd72
commit
ff2729cb15
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
#include "nsJSEnvironment.h"
|
#include "nsJSEnvironment.h"
|
||||||
#include "js/GCAPI.h"
|
#include "js/GCAPI.h"
|
||||||
|
#include "nsIAccessibilityService.h"
|
||||||
|
#include "xpcAccessibilityService.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
@ -26,5 +28,18 @@ FuzzingFunctions::CycleCollect(const GlobalObject&)
|
|||||||
nsJSContext::CycleCollectNow();
|
nsJSContext::CycleCollectNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* static */ void
|
||||||
|
FuzzingFunctions::EnableAccessibility(const GlobalObject&,
|
||||||
|
ErrorResult& aRv)
|
||||||
|
{
|
||||||
|
RefPtr<nsIAccessibilityService> a11y;
|
||||||
|
nsresult rv;
|
||||||
|
|
||||||
|
rv = NS_GetAccessibilityService(getter_AddRefs(a11y));
|
||||||
|
if (NS_FAILED(rv)) {
|
||||||
|
aRv.Throw(rv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -20,6 +20,9 @@ public:
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
CycleCollect(const GlobalObject&);
|
CycleCollect(const GlobalObject&);
|
||||||
|
|
||||||
|
static void
|
||||||
|
EnableAccessibility(const GlobalObject&, ErrorResult& aRv);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
@ -21,4 +21,10 @@ interface FuzzingFunctions {
|
|||||||
* Synchronously perform a cycle collection.
|
* Synchronously perform a cycle collection.
|
||||||
*/
|
*/
|
||||||
static void cycleCollect();
|
static void cycleCollect();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable accessibility.
|
||||||
|
*/
|
||||||
|
[Throws]
|
||||||
|
static void enableAccessibility();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user