Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / js / src / NamespaceImports.h
blob6a94263c8ca997211445b5770aa6cb161d4c1f62
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;
68 using JS::UniqueWideChars;
70 using JS::Ok;
71 using JS::OOM;
72 using JS::Result;
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;
84 using JS::IdVector;
85 using JS::ScriptVector;
86 using JS::ValueVector;
88 using JS::GCHashMap;
89 using JS::GCHashSet;
90 using JS::GCVector;
92 using JS::CallArgs;
93 using JS::CallNonGenericMethod;
94 using JS::IsAcceptableThis;
95 using JS::NativeImpl;
97 using JS::Rooted;
98 using JS::RootedBigInt;
99 using JS::RootedFunction;
100 using JS::RootedId;
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;
117 using JS::Handle;
118 using JS::HandleBigInt;
119 using JS::HandleFunction;
120 using JS::HandleId;
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;
150 using JS::Realm;
151 using JS::Zone;
153 using JS::BigInt;
155 #ifdef ENABLE_RECORD_TUPLE
156 using JS::RecordType;
157 using JS::TupleType;
158 #endif
160 } /* namespace js */
162 #endif /* NamespaceImports_h */