add firefox extension template

This commit is contained in:
2025-08-07 16:03:16 -05:00
parent 6cbb29fed1
commit 5df289ffcb
586 changed files with 13636 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
package webextension_polyfill.geckoprofiler;
typedef ProfilerFeature = String;

View File

@@ -0,0 +1,31 @@
package webextension_polyfill.geckoprofiler;
typedef StartSettingsType = {
/**
The maximum size in bytes of the buffer used to store profiling data. A larger value allows capturing a profile that
covers a greater amount of time.
**/
var bufferSize : Float;
/**
The length of the window of time that's kept in the buffer. Any collected samples are discarded as soon as they are
older than the number of seconds specified in this setting. Zero means no duration restriction.
Optional.
**/
@:optional
var windowLength : Float;
/**
Interval in milliseconds between samples of profiling data. A smaller value will increase the detail of the profiles
captured.
**/
var interval : Float;
/**
A list of active features for the profiler.
**/
var features : Array<ProfilerFeature>;
/**
A list of thread names for which to capture profiles.
Optional.
**/
@:optional
var threads : Array<String>;
};

View File

@@ -0,0 +1,47 @@
package webextension_polyfill.geckoprofiler;
typedef Static = {
/**
Starts the profiler with the specified settings.
**/
function start(settings:StartSettingsType):Void;
/**
Stops the profiler and discards any captured profile data.
**/
function stop():Void;
/**
Pauses the profiler, keeping any profile data that is already written.
**/
function pause():Void;
/**
Resumes the profiler with the settings that were initially used to start it.
**/
function resume():Void;
/**
Gathers the profile data from the current profiling session, and writes it to disk.
The returned promise resolves to a path that locates the created file.
**/
function dumpProfileToFile(fileName:String):Void;
/**
Gathers the profile data from the current profiling session.
**/
function getProfile():Void;
/**
Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that
contains a JSON string.
**/
function getProfileAsArrayBuffer():Void;
/**
Gathers the profile data from the current profiling session. The returned promise resolves to an array buffer that
contains a gzipped JSON string.
**/
function getProfileAsGzippedArrayBuffer():Void;
/**
Gets the debug symbols for a particular library.
**/
function getSymbols(debugName:String, breakpadId:String):Void;
/**
Fires when the profiler starts/stops running.
**/
var onRunning : webextension_polyfill.events.Event<(isRunning:Bool) -> Void>;
};

View File

@@ -0,0 +1,3 @@
package webextension_polyfill.geckoprofiler;
typedef Supports = String;