1 /* -*- Mode: C++; tab-width: 8; 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 // This file imports some common JS:: names into the js namespace so we can
8 // make unqualified references to them.
10 #ifndef NamespaceImports_h
11 #define NamespaceImports_h
13 // These includes are needed these for some typedefs (e.g. HandleValue) and
14 // functions (e.g. NullValue())...
15 #include "js/CallNonGenericMethod.h"
16 #include "js/GCHashTable.h"
17 #include "js/GCVector.h"
18 #include "js/TypeDecls.h"
21 // ... but we do forward declarations of the structs and classes not pulled in
22 // by the headers included above.
25 using ValueVector
= JS::GCVector
<JS::Value
>;
26 using IdVector
= JS::GCVector
<jsid
>;
27 using ScriptVector
= JS::GCVector
<JSScript
*>;
29 class HandleValueArray
;
33 class JS_PUBLIC_API PropertyDescriptor
;
42 namespace Scalar
= JS::Scalar
;
44 using JS::BooleanValue
;
45 using JS::DoubleValue
;
46 using JS::Float32Value
;
50 using JS::NumberValue
;
51 using JS::ObjectOrNullValue
;
52 using JS::ObjectValue
;
53 #ifdef ENABLE_RECORD_TUPLE
54 using JS::ExtendedPrimitiveValue
;
56 using JS::PrivateGCThingValue
;
57 using JS::PrivateUint32Value
;
58 using JS::PrivateValue
;
59 using JS::StringValue
;
60 using JS::UndefinedValue
;
65 using JS::UniqueChars
;
66 using JS::UniqueLatin1Chars
;
67 using JS::UniqueTwoByteChars
;
68 using JS::UniqueWideChars
;
74 using JS::HandleIdVector
;
75 using JS::HandleObjectVector
;
76 using JS::HandleValueVector
;
77 using JS::MutableHandleIdVector
;
78 using JS::MutableHandleObjectVector
;
79 using JS::MutableHandleValueVector
;
80 using JS::RootedIdVector
;
81 using JS::RootedObjectVector
;
82 using JS::RootedValueVector
;
85 using JS::ScriptVector
;
86 using JS::ValueVector
;
93 using JS::CallNonGenericMethod
;
94 using JS::IsAcceptableThis
;
98 using JS::RootedBigInt
;
99 using JS::RootedFunction
;
101 using JS::RootedObject
;
102 using JS::RootedScript
;
103 using JS::RootedString
;
104 using JS::RootedSymbol
;
105 using JS::RootedValue
;
107 using JS::PersistentRooted
;
108 using JS::PersistentRootedBigInt
;
109 using JS::PersistentRootedFunction
;
110 using JS::PersistentRootedId
;
111 using JS::PersistentRootedObject
;
112 using JS::PersistentRootedScript
;
113 using JS::PersistentRootedString
;
114 using JS::PersistentRootedSymbol
;
115 using JS::PersistentRootedValue
;
118 using JS::HandleBigInt
;
119 using JS::HandleFunction
;
121 using JS::HandleObject
;
122 using JS::HandleScript
;
123 using JS::HandleString
;
124 using JS::HandleSymbol
;
125 using JS::HandleValue
;
127 using JS::MutableHandle
;
128 using JS::MutableHandleBigInt
;
129 using JS::MutableHandleFunction
;
130 using JS::MutableHandleId
;
131 using JS::MutableHandleObject
;
132 using JS::MutableHandleScript
;
133 using JS::MutableHandleString
;
134 using JS::MutableHandleSymbol
;
135 using JS::MutableHandleValue
;
137 using JS::FalseHandleValue
;
138 using JS::NullHandleValue
;
139 using JS::TrueHandleValue
;
140 using JS::UndefinedHandleValue
;
142 using JS::HandleValueArray
;
144 using JS::ObjectOpResult
;
146 using JS::PropertyDescriptor
;
147 using JS::PropertyKey
;
149 using JS::Compartment
;
155 #ifdef ENABLE_RECORD_TUPLE
156 using JS::RecordType
;
162 #endif /* NamespaceImports_h */