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 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/TypeDecls.h"
19 // ... but we do forward declarations of the structs and classes not pulled in
20 // by the headers included above.
25 class ConstTwoByteChars
;
31 class AutoFunctionVector
;
33 class AutoObjectVector
;
34 class AutoScriptVector
;
35 class AutoValueVector
;
39 template <typename T
> class AutoVectorRooter
;
40 template<typename K
, typename V
> class AutoHashMapRooter
;
41 template<typename T
> class AutoHashSetRooter
;
42 template<typename T
> class RootedGeneric
;
44 class MOZ_STACK_CLASS SourceBufferHolder
;
46 class HandleValueArray
;
54 using JS::BooleanValue
;
55 using JS::DoubleValue
;
56 using JS::Float32Value
;
58 using JS::IsPoisonedValue
;
61 using JS::NumberValue
;
62 using JS::ObjectOrNullValue
;
63 using JS::ObjectValue
;
64 using JS::PrivateUint32Value
;
65 using JS::PrivateValue
;
66 using JS::StringValue
;
67 using JS::UndefinedValue
;
69 using JS::IsPoisonedPtr
;
72 using JS::Latin1Chars
;
73 using JS::Latin1CharsZ
;
74 using JS::ConstTwoByteChars
;
75 using JS::TwoByteChars
;
76 using JS::TwoByteCharsZ
;
80 using JS::AutoFunctionVector
;
81 using JS::AutoIdVector
;
82 using JS::AutoObjectVector
;
83 using JS::AutoScriptVector
;
84 using JS::AutoValueVector
;
86 using JS::AutoIdArray
;
88 using JS::AutoHashMapRooter
;
89 using JS::AutoHashSetRooter
;
90 using JS::AutoVectorRooter
;
91 using JS::RootedGeneric
;
94 using JS::CallNonGenericMethod
;
95 using JS::CallReceiver
;
96 using JS::CompileOptions
;
97 using JS::IsAcceptableThis
;
99 using JS::OwningCompileOptions
;
100 using JS::ReadOnlyCompileOptions
;
101 using JS::SourceBufferHolder
;
104 using JS::RootedFunction
;
106 using JS::RootedObject
;
107 using JS::RootedScript
;
108 using JS::RootedString
;
109 using JS::RootedSymbol
;
110 using JS::RootedValue
;
112 using JS::PersistentRooted
;
113 using JS::PersistentRootedFunction
;
114 using JS::PersistentRootedId
;
115 using JS::PersistentRootedObject
;
116 using JS::PersistentRootedScript
;
117 using JS::PersistentRootedString
;
118 using JS::PersistentRootedSymbol
;
119 using JS::PersistentRootedValue
;
122 using JS::HandleFunction
;
124 using JS::HandleObject
;
125 using JS::HandleScript
;
126 using JS::HandleString
;
127 using JS::HandleSymbol
;
128 using JS::HandleValue
;
130 using JS::MutableHandle
;
131 using JS::MutableHandleFunction
;
132 using JS::MutableHandleId
;
133 using JS::MutableHandleObject
;
134 using JS::MutableHandleScript
;
135 using JS::MutableHandleString
;
136 using JS::MutableHandleSymbol
;
137 using JS::MutableHandleValue
;
139 using JS::NullHandleValue
;
140 using JS::UndefinedHandleValue
;
141 using JS::TrueHandleValue
;
142 using JS::FalseHandleValue
;
144 using JS::HandleValueArray
;
150 #endif /* NamespaceImports_h */