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.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
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 // This file contains public type declarations that are used *frequently*. If
8 // it doesn't occur at least 10 times in Gecko, it probably shouldn't be in
9 // here.
10 //
11 // It includes only:
12 // - forward declarations of structs and classes;
13 // - typedefs;
14 // - enums (maybe).
15 // It does *not* contain any struct or class definitions.
17 #ifndef js_TypeDecls_h
18 #define js_TypeDecls_h
20 #include <stddef.h>
21 #include <stdint.h>
23 #include "js-config.h"
25 struct JSContext;
26 class JSFunction;
27 class JSObject;
28 class JSScript;
29 class JSString;
31 struct jsid;
33 typedef char16_t jschar;
35 namespace JS {
37 class Value;
38 template <typename T> class Handle;
39 template <typename T> class MutableHandle;
40 template <typename T> class Rooted;
41 template <typename T> class PersistentRooted;
43 typedef Handle<JSFunction*> HandleFunction;
44 typedef Handle<jsid> HandleId;
45 typedef Handle<JSObject*> HandleObject;
46 typedef Handle<JSScript*> HandleScript;
47 typedef Handle<JSString*> HandleString;
48 typedef Handle<Value> HandleValue;
50 typedef MutableHandle<JSFunction*> MutableHandleFunction;
51 typedef MutableHandle<jsid> MutableHandleId;
52 typedef MutableHandle<JSObject*> MutableHandleObject;
53 typedef MutableHandle<JSScript*> MutableHandleScript;
54 typedef MutableHandle<JSString*> MutableHandleString;
55 typedef MutableHandle<Value> MutableHandleValue;
57 typedef Rooted<JSObject*> RootedObject;
58 typedef Rooted<JSFunction*> RootedFunction;
59 typedef Rooted<JSScript*> RootedScript;
60 typedef Rooted<JSString*> RootedString;
61 typedef Rooted<jsid> RootedId;
62 typedef Rooted<JS::Value> RootedValue;
64 typedef PersistentRooted<JSFunction*> PersistentRootedFunction;
65 typedef PersistentRooted<jsid> PersistentRootedId;
66 typedef PersistentRooted<JSObject*> PersistentRootedObject;
67 typedef PersistentRooted<JSScript*> PersistentRootedScript;
68 typedef PersistentRooted<JSString*> PersistentRootedString;
69 typedef PersistentRooted<Value> PersistentRootedValue;
71 } // namespace JS
73 #endif /* js_TypeDecls_h */