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_
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
)
17 RLBOX_DEFINE_BASE_TYPES_FOR(woff2
, noop
)
20 #include "mozilla/RLBoxSandboxPool.h"
21 #include "mozilla/StaticPtr.h"
23 class RLBoxWOFF2SandboxPool
: public mozilla::RLBoxSandboxPool
{
25 explicit RLBoxWOFF2SandboxPool(size_t aDelaySeconds
)
26 : RLBoxSandboxPool(aDelaySeconds
) {}
28 static mozilla::StaticRefPtr
<RLBoxWOFF2SandboxPool
> sSingleton
;
29 static void Initalize(size_t aDelaySeconds
= 10);
32 mozilla::UniquePtr
<mozilla::RLBoxSandboxDataBase
> CreateSandboxData(
33 uint64_t aSize
) override
;
34 ~RLBoxWOFF2SandboxPool() = default;