diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/public/TypeDecls.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/public/TypeDecls.h')
-rw-r--r-- | js/public/TypeDecls.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/js/public/TypeDecls.h b/js/public/TypeDecls.h new file mode 100644 index 000000000..acb93f973 --- /dev/null +++ b/js/public/TypeDecls.h @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * vim: set ts=8 sts=4 et sw=4 tw=99: + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// This file contains public type declarations that are used *frequently*. If +// it doesn't occur at least 10 times in Gecko, it probably shouldn't be in +// here. +// +// It includes only: +// - forward declarations of structs and classes; +// - typedefs; +// - enums (maybe). +// It does *not* contain any struct or class definitions. + +#ifndef js_TypeDecls_h +#define js_TypeDecls_h + +#include <stddef.h> +#include <stdint.h> + +#include "js-config.h" + +struct JSContext; +class JSFunction; +class JSObject; +class JSScript; +class JSString; +class JSAddonId; + +struct jsid; + +namespace JS { + +typedef unsigned char Latin1Char; + +class Symbol; +class Value; +template <typename T> class Handle; +template <typename T> class MutableHandle; +template <typename T> class Rooted; +template <typename T> class PersistentRooted; + +typedef Handle<JSFunction*> HandleFunction; +typedef Handle<jsid> HandleId; +typedef Handle<JSObject*> HandleObject; +typedef Handle<JSScript*> HandleScript; +typedef Handle<JSString*> HandleString; +typedef Handle<JS::Symbol*> HandleSymbol; +typedef Handle<Value> HandleValue; + +typedef MutableHandle<JSFunction*> MutableHandleFunction; +typedef MutableHandle<jsid> MutableHandleId; +typedef MutableHandle<JSObject*> MutableHandleObject; +typedef MutableHandle<JSScript*> MutableHandleScript; +typedef MutableHandle<JSString*> MutableHandleString; +typedef MutableHandle<JS::Symbol*> MutableHandleSymbol; +typedef MutableHandle<Value> MutableHandleValue; + +typedef Rooted<JSObject*> RootedObject; +typedef Rooted<JSFunction*> RootedFunction; +typedef Rooted<JSScript*> RootedScript; +typedef Rooted<JSString*> RootedString; +typedef Rooted<JS::Symbol*> RootedSymbol; +typedef Rooted<jsid> RootedId; +typedef Rooted<JS::Value> RootedValue; + +typedef PersistentRooted<JSFunction*> PersistentRootedFunction; +typedef PersistentRooted<jsid> PersistentRootedId; +typedef PersistentRooted<JSObject*> PersistentRootedObject; +typedef PersistentRooted<JSScript*> PersistentRootedScript; +typedef PersistentRooted<JSString*> PersistentRootedString; +typedef PersistentRooted<JS::Symbol*> PersistentRootedSymbol; +typedef PersistentRooted<Value> PersistentRootedValue; + +} // namespace JS + +#endif /* js_TypeDecls_h */ |