tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

rlbox_config.h (1266B)


      1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef RLBOX_CONFIG
      7 #define RLBOX_CONFIG
      8 
      9 #include "mozilla/Assertions.h"
     10 
     11 // All uses of rlbox's function and callbacks invocations are on a single
     12 // thread right now, so we disable rlbox thread checks for performance
     13 // See (Bug 1739298) for more details
     14 #define RLBOX_SINGLE_THREADED_INVOCATIONS
     15 
     16 #define RLBOX_CUSTOM_ABORT(msg) MOZ_CRASH_UNSAFE_PRINTF("RLBox crash: %s", msg)
     17 
     18 // The MingW compiler does not correctly handle static thread_local inline
     19 // members. This toggles a workaround that allows the host application (firefox)
     20 // to provide TLS storage via functions. This can be removed if the MingW bug is
     21 // fixed.
     22 #define RLBOX_EMBEDDER_PROVIDES_TLS_STATIC_VARIABLES
     23 
     24 // When instantiating a wasm sandbox, rlbox requires the name of the wasm module
     25 // being instantiated. LLVM and wasm2c use the module name by choosing the name
     26 // used to generate the wasm file. In Firefox this is a static library called
     27 // rlbox
     28 #define RLBOX_WASM2C_MODULE_NAME rlbox
     29 
     30 #endif