Bug 1842773 - Part 16: Replace TypedArrayObject with FixedLengthTypedArrayObject...
[gecko.git] / gfx / ots / RLBoxWOFF2Types.h
blobaa291be85e97d70d370b7bc70a43e3dd39fa50c5
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef MODULES_WOFF2_RLBOXWOFF2TYPES_H_
8 #define MODULES_WOFF2_RLBOXWOFF2TYPES_H_
10 #include <stddef.h>
11 #include "mozilla/rlbox/rlbox_types.hpp"
12 #include "woff2/decode.h"
14 #ifdef MOZ_WASM_SANDBOXING_WOFF2
15 RLBOX_DEFINE_BASE_TYPES_FOR(woff2, wasm2c)
16 #else
17 RLBOX_DEFINE_BASE_TYPES_FOR(woff2, noop)
18 #endif
20 #include "mozilla/RLBoxSandboxPool.h"
21 #include "mozilla/StaticPtr.h"
23 class RLBoxWOFF2SandboxPool : public mozilla::RLBoxSandboxPool {
24 public:
25 explicit RLBoxWOFF2SandboxPool(size_t aDelaySeconds)
26 : RLBoxSandboxPool(aDelaySeconds) {}
28 static mozilla::StaticRefPtr<RLBoxWOFF2SandboxPool> sSingleton;
29 static void Initalize(size_t aDelaySeconds = 10);
31 protected:
32 mozilla::UniquePtr<mozilla::RLBoxSandboxDataBase> CreateSandboxData(
33 uint64_t aSize) override;
34 ~RLBoxWOFF2SandboxPool() = default;
37 #endif