Bug 1866238 - Make FuzzingFunctions a namespace. r=farre

Differential Revision: https://phabricator.services.mozilla.com/D194479
This commit is contained in:
Peter Van der Beken 2023-11-30 15:28:12 +00:00
parent 2e0b9601da
commit 3ba1cb277a
2 changed files with 10 additions and 17 deletions

View file

@ -321,13 +321,6 @@ DOMInterfaces = {
'nativeType': 'nsFrameLoader', 'nativeType': 'nsFrameLoader',
}, },
'FuzzingFunctions': {
# The codegen is dumb, and doesn't understand that this interface is only a
# collection of static methods, so we have this `concrete: False` hack.
'concrete': False,
'headerFile': 'mozilla/dom/FuzzingFunctions.h',
},
'HeapSnapshot': { 'HeapSnapshot': {
'nativeType': 'mozilla::devtools::HeapSnapshot' 'nativeType': 'mozilla::devtools::HeapSnapshot'
}, },

View file

@ -12,43 +12,43 @@
[Pref="fuzzing.enabled", [Pref="fuzzing.enabled",
Exposed=Window] Exposed=Window]
interface FuzzingFunctions { namespace FuzzingFunctions {
/** /**
* Synchronously perform a garbage collection. * Synchronously perform a garbage collection.
*/ */
static undefined garbageCollect(); undefined garbageCollect();
/** /**
* Synchronously perform a compacting garbage collection. * Synchronously perform a compacting garbage collection.
*/ */
static undefined garbageCollectCompacting(); undefined garbageCollectCompacting();
/** /**
* Trigger a forced crash. * Trigger a forced crash.
*/ */
static undefined crash(optional DOMString reason = ""); undefined crash(optional DOMString reason = "");
/** /**
* Synchronously perform a cycle collection. * Synchronously perform a cycle collection.
*/ */
static undefined cycleCollect(); undefined cycleCollect();
/** /**
* Send a memory pressure event, causes shrinking GC, cycle collection and * Send a memory pressure event, causes shrinking GC, cycle collection and
* other actions. * other actions.
*/ */
static undefined memoryPressure(); undefined memoryPressure();
/** /**
* Enable accessibility. * Enable accessibility.
*/ */
[Throws] [Throws]
static undefined enableAccessibility(); undefined enableAccessibility();
/** /**
* Send IPC fuzzing ready event to parent. * Send IPC fuzzing ready event to parent.
*/ */
static undefined signalIPCReady(); undefined signalIPCReady();
/** /**
* synthesizeKeyboardEvents() synthesizes a set of "keydown", * synthesizeKeyboardEvents() synthesizes a set of "keydown",
@ -130,6 +130,6 @@ interface FuzzingFunctions {
* keyCode: KeyboardEvent.DOM_VK_COLON }); * keyCode: KeyboardEvent.DOM_VK_COLON });
*/ */
[Throws] [Throws]
static undefined synthesizeKeyboardEvents(DOMString aKeyValue, undefined synthesizeKeyboardEvents(DOMString aKeyValue,
optional KeyboardEventInit aDictionary = {}); optional KeyboardEventInit aDictionary = {});
}; };