summaryrefslogtreecommitdiffstats
path: root/dom/workers/nsIWorkerDebugger.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/workers/nsIWorkerDebugger.idl
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/workers/nsIWorkerDebugger.idl')
-rw-r--r--dom/workers/nsIWorkerDebugger.idl69
1 files changed, 69 insertions, 0 deletions
diff --git a/dom/workers/nsIWorkerDebugger.idl b/dom/workers/nsIWorkerDebugger.idl
new file mode 100644
index 0000000000..35b58e78e5
--- /dev/null
+++ b/dom/workers/nsIWorkerDebugger.idl
@@ -0,0 +1,69 @@
+#include "nsISupports.idl"
+
+interface mozIDOMWindow;
+interface nsIPrincipal;
+
+[scriptable, uuid(9cf3b48e-361d-486a-8917-55cf8d00bb41)]
+interface nsIWorkerDebuggerListener : nsISupports
+{
+ void onClose();
+
+ void onError(in AString filename, in unsigned long lineno,
+ in AString message);
+
+ void onMessage(in AString message);
+};
+
+[scriptable, builtinclass, uuid(22f93aa3-8a05-46be-87e0-fa93bf8a8eff)]
+interface nsIWorkerDebugger : nsISupports
+{
+ const unsigned long TYPE_DEDICATED = 0;
+ const unsigned long TYPE_SHARED = 1;
+ const unsigned long TYPE_SERVICE = 2;
+
+ readonly attribute bool isClosed;
+
+ readonly attribute bool isChrome;
+
+ readonly attribute bool isInitialized;
+
+ readonly attribute nsIWorkerDebugger parent;
+
+ readonly attribute unsigned long type;
+
+ readonly attribute AString url;
+
+ // If this is a dedicated worker, the window this worker or (in the case of
+ // nested workers) its top-level ancestral worker is associated with.
+ readonly attribute mozIDOMWindow window;
+
+ readonly attribute Array<uint64_t> windowIDs;
+
+ readonly attribute nsIPrincipal principal;
+
+ readonly attribute unsigned long serviceWorkerID;
+
+ readonly attribute AString id;
+
+ void initialize(in AString url);
+
+ [binaryname(PostMessageMoz)]
+ void postMessage(in AString message);
+
+ void addListener(in nsIWorkerDebuggerListener listener);
+
+ void removeListener(in nsIWorkerDebuggerListener listener);
+
+ // Indicate whether the debugger has finished initializing. By default the
+ // debugger will be considered initialized when the onRegister hooks in all
+ // nsIWorkerDebuggerManagerListener have been called.
+ //
+ // setDebuggerReady(false) can be called during an onRegister hook to mark
+ // the debugger as not being ready yet. This will prevent all content from
+ // running in the worker, including the worker's main script and any messages
+ // posted to it. Other runnables will still execute in the worker as normal.
+ //
+ // When the debugger is ready, setDebuggerReady(true) should then be called
+ // to allow the worker to begin executing content.
+ void setDebuggerReady(in boolean ready);
+};