Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- |
michael@0 | 2 | * vim: set ts=8 sts=4 et sw=4 tw=99: |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | // This file contains public type declarations that are used *frequently*. If |
michael@0 | 8 | // it doesn't occur at least 10 times in Gecko, it probably shouldn't be in |
michael@0 | 9 | // here. |
michael@0 | 10 | // |
michael@0 | 11 | // It includes only: |
michael@0 | 12 | // - forward declarations of structs and classes; |
michael@0 | 13 | // - typedefs; |
michael@0 | 14 | // - enums (maybe). |
michael@0 | 15 | // It does *not* contain any struct or class definitions. |
michael@0 | 16 | |
michael@0 | 17 | #ifndef js_TypeDecls_h |
michael@0 | 18 | #define js_TypeDecls_h |
michael@0 | 19 | |
michael@0 | 20 | #include <stddef.h> |
michael@0 | 21 | #include <stdint.h> |
michael@0 | 22 | |
michael@0 | 23 | #include "js-config.h" |
michael@0 | 24 | |
michael@0 | 25 | struct JSContext; |
michael@0 | 26 | class JSFunction; |
michael@0 | 27 | class JSObject; |
michael@0 | 28 | class JSScript; |
michael@0 | 29 | class JSString; |
michael@0 | 30 | |
michael@0 | 31 | struct jsid; |
michael@0 | 32 | |
michael@0 | 33 | typedef char16_t jschar; |
michael@0 | 34 | |
michael@0 | 35 | namespace JS { |
michael@0 | 36 | |
michael@0 | 37 | class Value; |
michael@0 | 38 | template <typename T> class Handle; |
michael@0 | 39 | template <typename T> class MutableHandle; |
michael@0 | 40 | template <typename T> class Rooted; |
michael@0 | 41 | template <typename T> class PersistentRooted; |
michael@0 | 42 | |
michael@0 | 43 | typedef Handle<JSFunction*> HandleFunction; |
michael@0 | 44 | typedef Handle<jsid> HandleId; |
michael@0 | 45 | typedef Handle<JSObject*> HandleObject; |
michael@0 | 46 | typedef Handle<JSScript*> HandleScript; |
michael@0 | 47 | typedef Handle<JSString*> HandleString; |
michael@0 | 48 | typedef Handle<Value> HandleValue; |
michael@0 | 49 | |
michael@0 | 50 | typedef MutableHandle<JSFunction*> MutableHandleFunction; |
michael@0 | 51 | typedef MutableHandle<jsid> MutableHandleId; |
michael@0 | 52 | typedef MutableHandle<JSObject*> MutableHandleObject; |
michael@0 | 53 | typedef MutableHandle<JSScript*> MutableHandleScript; |
michael@0 | 54 | typedef MutableHandle<JSString*> MutableHandleString; |
michael@0 | 55 | typedef MutableHandle<Value> MutableHandleValue; |
michael@0 | 56 | |
michael@0 | 57 | typedef Rooted<JSObject*> RootedObject; |
michael@0 | 58 | typedef Rooted<JSFunction*> RootedFunction; |
michael@0 | 59 | typedef Rooted<JSScript*> RootedScript; |
michael@0 | 60 | typedef Rooted<JSString*> RootedString; |
michael@0 | 61 | typedef Rooted<jsid> RootedId; |
michael@0 | 62 | typedef Rooted<JS::Value> RootedValue; |
michael@0 | 63 | |
michael@0 | 64 | typedef PersistentRooted<JSFunction*> PersistentRootedFunction; |
michael@0 | 65 | typedef PersistentRooted<jsid> PersistentRootedId; |
michael@0 | 66 | typedef PersistentRooted<JSObject*> PersistentRootedObject; |
michael@0 | 67 | typedef PersistentRooted<JSScript*> PersistentRootedScript; |
michael@0 | 68 | typedef PersistentRooted<JSString*> PersistentRootedString; |
michael@0 | 69 | typedef PersistentRooted<Value> PersistentRootedValue; |
michael@0 | 70 | |
michael@0 | 71 | } // namespace JS |
michael@0 | 72 | |
michael@0 | 73 | #endif /* js_TypeDecls_h */ |