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
;
28 class AutoFunctionVector
;
30 class AutoObjectVector
;
31 class AutoScriptVector
;
32 class AutoValueVector
;
36 template <typename T
> class AutoVectorRooter
;
37 template<typename K
, typename V
> class AutoHashMapRooter
;
38 template<typename T
> class AutoHashSetRooter
;
39 template<typename T
> class RootedGeneric
;
41 class MOZ_STACK_CLASS SourceBufferHolder
;
43 class HandleValueArray
;
51 using JS::BooleanValue
;
52 using JS::DoubleValue
;
53 using JS::Float32Value
;
55 using JS::IsPoisonedValue
;
58 using JS::NumberValue
;
59 using JS::ObjectOrNullValue
;
60 using JS::ObjectValue
;
61 using JS::PrivateUint32Value
;
62 using JS::PrivateValue
;
63 using JS::StringValue
;
64 using JS::UndefinedValue
;
66 using JS::IsPoisonedPtr
;
69 using JS::Latin1Chars
;
70 using JS::Latin1CharsZ
;
71 using JS::ConstTwoByteChars
;
72 using JS::TwoByteChars
;
74 using JS::AutoFunctionVector
;
75 using JS::AutoIdVector
;
76 using JS::AutoObjectVector
;
77 using JS::AutoScriptVector
;
78 using JS::AutoValueVector
;
80 using JS::AutoIdArray
;
82 using JS::AutoHashMapRooter
;
83 using JS::AutoHashSetRooter
;
84 using JS::AutoVectorRooter
;
85 using JS::RootedGeneric
;
88 using JS::CallNonGenericMethod
;
89 using JS::CallReceiver
;
90 using JS::CompileOptions
;
91 using JS::IsAcceptableThis
;
93 using JS::OwningCompileOptions
;
94 using JS::ReadOnlyCompileOptions
;
95 using JS::SourceBufferHolder
;
98 using JS::RootedFunction
;
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::PersistentRootedFunction
;
108 using JS::PersistentRootedId
;
109 using JS::PersistentRootedObject
;
110 using JS::PersistentRootedScript
;
111 using JS::PersistentRootedString
;
112 using JS::PersistentRootedSymbol
;
113 using JS::PersistentRootedValue
;
116 using JS::HandleFunction
;
118 using JS::HandleObject
;
119 using JS::HandleScript
;
120 using JS::HandleString
;
121 using JS::HandleSymbol
;
122 using JS::HandleValue
;
124 using JS::MutableHandle
;
125 using JS::MutableHandleFunction
;
126 using JS::MutableHandleId
;
127 using JS::MutableHandleObject
;
128 using JS::MutableHandleScript
;
129 using JS::MutableHandleString
;
130 using JS::MutableHandleSymbol
;
131 using JS::MutableHandleValue
;
133 using JS::NullHandleValue
;
134 using JS::UndefinedHandleValue
;
136 using JS::HandleValueArray
;
142 #endif /* NamespaceImports_h */