Backed out 2 changesets (bug 1832733) for causing mochitest manifest failures and...
[gecko.git] / js / src / NamespaceImports.h
blob235483d7656ec7d281623e2e4e2e4392f3660226
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"
19 #include "js/Value.h"
21 // ... but we do forward declarations of the structs and classes not pulled in
22 // by the headers included above.
23 namespace JS {
25 using ValueVector = JS::GCVector<JS::Value>;
26 using IdVector = JS::GCVector<jsid>;
27 using ScriptVector = JS::GCVector<JSScript*>;
29 class HandleValueArray;
31 class ObjectOpResult;
33 class JS_PUBLIC_API PropertyDescriptor;
35 namespace Scalar {}
37 } // namespace JS
39 // Do the importing.
40 namespace js {
42 namespace Scalar = JS::Scalar;
44 using JS::BooleanValue;
45 using JS::DoubleValue;
46 using JS::Float32Value;
47 using JS::Int32Value;
48 using JS::MagicValue;
49 using JS::NullValue;
50 using JS::NumberValue;
51 using JS::ObjectOrNullValue;
52 using JS::ObjectValue;
53 #ifdef ENABLE_RECORD_TUPLE
54 using JS::ExtendedPrimitiveValue;
55 #endif
56 using JS::PrivateGCThingValue;
57 using JS::PrivateUint32Value;
58 using JS::PrivateValue;
59 using JS::StringValue;
60 using JS::UndefinedValue;
61 using JS::Value;
62 using JS::ValueType;
64 using JS::Latin1Char;
65 using JS::UniqueChars;
66 using JS::UniqueLatin1Chars;
67 using JS::UniqueTwoByteChars;
69 using JS::Ok;
70 using JS::OOM;
71 using JS::Result;
73 using JS::HandleIdVector;
74 using JS::HandleObjectVector;
75 using JS::HandleValueVector;
76 using JS::MutableHandleIdVector;
77 using JS::MutableHandleObjectVector;
78 using JS::MutableHandleValueVector;
79 using JS::RootedIdVector;
80 using JS::RootedObjectVector;
81 using JS::RootedValueVector;
83 using JS::IdVector;
84 using JS::ScriptVector;
85 using JS::ValueVector;
87 using JS::GCHashMap;
88 using JS::GCHashSet;
89 using JS::GCVector;
91 using JS::CallArgs;
92 using JS::CallNonGenericMethod;
93 using JS::IsAcceptableThis;
94 using JS::NativeImpl;
96 using JS::Rooted;
97 using JS::RootedBigInt;
98 using JS::RootedFunction;
99 using JS::RootedId;
100 using JS::RootedObject;
101 using JS::RootedScript;
102 using JS::RootedString;
103 using JS::RootedSymbol;
104 using JS::RootedValue;
106 using JS::PersistentRooted;
107 using JS::PersistentRootedBigInt;
108 using JS::PersistentRootedFunction;
109 using JS::PersistentRootedId;
110 using JS::PersistentRootedObject;
111 using JS::PersistentRootedScript;
112 using JS::PersistentRootedString;
113 using JS::PersistentRootedSymbol;
114 using JS::PersistentRootedValue;
116 using JS::Handle;
117 using JS::HandleBigInt;
118 using JS::HandleFunction;
119 using JS::HandleId;
120 using JS::HandleObject;
121 using JS::HandleScript;
122 using JS::HandleString;
123 using JS::HandleSymbol;
124 using JS::HandleValue;
126 using JS::MutableHandle;
127 using JS::MutableHandleBigInt;
128 using JS::MutableHandleFunction;
129 using JS::MutableHandleId;
130 using JS::MutableHandleObject;
131 using JS::MutableHandleScript;
132 using JS::MutableHandleString;
133 using JS::MutableHandleSymbol;
134 using JS::MutableHandleValue;
136 using JS::FalseHandleValue;
137 using JS::NullHandleValue;
138 using JS::TrueHandleValue;
139 using JS::UndefinedHandleValue;
141 using JS::HandleValueArray;
143 using JS::ObjectOpResult;
145 using JS::PropertyDescriptor;
146 using JS::PropertyKey;
148 using JS::Compartment;
149 using JS::Realm;
150 using JS::Zone;
152 using JS::BigInt;
154 #ifdef ENABLE_RECORD_TUPLE
155 using JS::RecordType;
156 using JS::TupleType;
157 #endif
159 } /* namespace js */
161 #endif /* NamespaceImports_h */