summaryrefslogtreecommitdiffstats
path: root/dom/quota/test/modules/content/UtilsParent.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'dom/quota/test/modules/content/UtilsParent.mjs')
-rw-r--r--dom/quota/test/modules/content/UtilsParent.mjs21
1 files changed, 21 insertions, 0 deletions
diff --git a/dom/quota/test/modules/content/UtilsParent.mjs b/dom/quota/test/modules/content/UtilsParent.mjs
new file mode 100644
index 0000000000..f7ebde3c34
--- /dev/null
+++ b/dom/quota/test/modules/content/UtilsParent.mjs
@@ -0,0 +1,21 @@
+/**
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+import { Utils } from "./Utils.mjs";
+
+export const UtilsParent = {
+ async OnMessageReceived(worker, msg) {
+ switch (msg.op) {
+ case "getCachedOriginUsage": {
+ const result = await Utils.getCachedOriginUsage();
+ worker.postMessage(result);
+ break;
+ }
+
+ default:
+ throw new Error(`Unknown op ${msg.op}`);
+ }
+ },
+};