/work/obj-fuzz/dist/include/mozilla/dom/DOMExceptionBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM DOMException.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_DOMExceptionBinding_h |
4 | | #define mozilla_dom_DOMExceptionBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | #include "mozilla/dom/PrototypeList.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | class DOMException; |
18 | | struct DOMExceptionAtoms; |
19 | | class Exception; |
20 | | struct ExceptionAtoms; |
21 | | struct NativePropertyHooks; |
22 | | class ProtoAndIfaceCache; |
23 | | |
24 | | } // namespace dom |
25 | | } // namespace mozilla |
26 | | |
27 | | namespace mozilla { |
28 | | namespace dom { |
29 | | |
30 | | namespace DOMException_Binding { |
31 | | |
32 | | typedef mozilla::dom::DOMException NativeType; |
33 | | |
34 | | static const uint16_t INDEX_SIZE_ERR = 1; |
35 | | static const uint16_t DOMSTRING_SIZE_ERR = 2; |
36 | | static const uint16_t HIERARCHY_REQUEST_ERR = 3; |
37 | | static const uint16_t WRONG_DOCUMENT_ERR = 4; |
38 | | static const uint16_t INVALID_CHARACTER_ERR = 5; |
39 | | static const uint16_t NO_DATA_ALLOWED_ERR = 6; |
40 | | static const uint16_t NO_MODIFICATION_ALLOWED_ERR = 7; |
41 | | static const uint16_t NOT_FOUND_ERR = 8; |
42 | | static const uint16_t NOT_SUPPORTED_ERR = 9; |
43 | | static const uint16_t INUSE_ATTRIBUTE_ERR = 10; |
44 | | static const uint16_t INVALID_STATE_ERR = 11; |
45 | | static const uint16_t SYNTAX_ERR = 12; |
46 | | static const uint16_t INVALID_MODIFICATION_ERR = 13; |
47 | | static const uint16_t NAMESPACE_ERR = 14; |
48 | | static const uint16_t INVALID_ACCESS_ERR = 15; |
49 | | static const uint16_t VALIDATION_ERR = 16; |
50 | | static const uint16_t TYPE_MISMATCH_ERR = 17; |
51 | | static const uint16_t SECURITY_ERR = 18; |
52 | | static const uint16_t NETWORK_ERR = 19; |
53 | | static const uint16_t ABORT_ERR = 20; |
54 | | static const uint16_t URL_MISMATCH_ERR = 21; |
55 | | static const uint16_t QUOTA_EXCEEDED_ERR = 22; |
56 | | static const uint16_t TIMEOUT_ERR = 23; |
57 | | static const uint16_t INVALID_NODE_TYPE_ERR = 24; |
58 | | static const uint16_t DATA_CLONE_ERR = 25; |
59 | | const JSClass* |
60 | | GetJSClass(); |
61 | | |
62 | | bool |
63 | | Wrap(JSContext* aCx, mozilla::dom::DOMException* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
64 | | |
65 | | template <class T> |
66 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
67 | 0 | { |
68 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
69 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
70 | 0 | } |
71 | | |
72 | | // We declare this as an array so that retrieving a pointer to this |
73 | | // binding's property hooks only requires compile/link-time resolvable |
74 | | // address arithmetic. Declaring it as a pointer instead would require |
75 | | // doing a run-time load to fetch a pointer to this binding's property |
76 | | // hooks. And then structures which embedded a pointer to this structure |
77 | | // would require a run-time load for proper initialization, which would |
78 | | // then induce static constructors. Lots of static constructors. |
79 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
80 | | |
81 | | void |
82 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
83 | | |
84 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
85 | 0 | { |
86 | 0 | /* Get the interface prototype object for this class. This will create the |
87 | 0 | object as needed. */ |
88 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::DOMException, |
89 | 0 | &CreateInterfaceObjects, |
90 | 0 | /* aDefineOnGlobal = */ true); |
91 | 0 |
|
92 | 0 | } |
93 | | |
94 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
95 | 0 | { |
96 | 0 | /* Get the interface object for this class. This will create the object as |
97 | 0 | needed. */ |
98 | 0 |
|
99 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::DOMException, |
100 | 0 | &CreateInterfaceObjects, |
101 | 0 | aDefineOnGlobal); |
102 | 0 | } |
103 | | |
104 | | JSObject* |
105 | | GetConstructorObject(JSContext* aCx); |
106 | | |
107 | | } // namespace DOMException_Binding |
108 | | |
109 | | |
110 | | |
111 | | namespace Exception_Binding { |
112 | | |
113 | | typedef mozilla::dom::Exception NativeType; |
114 | | |
115 | | const JSClass* |
116 | | GetJSClass(); |
117 | | |
118 | | bool |
119 | | Wrap(JSContext* aCx, mozilla::dom::Exception* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
120 | | |
121 | | template <class T> |
122 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
123 | 0 | { |
124 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
125 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
126 | 0 | } |
127 | | |
128 | | // We declare this as an array so that retrieving a pointer to this |
129 | | // binding's property hooks only requires compile/link-time resolvable |
130 | | // address arithmetic. Declaring it as a pointer instead would require |
131 | | // doing a run-time load to fetch a pointer to this binding's property |
132 | | // hooks. And then structures which embedded a pointer to this structure |
133 | | // would require a run-time load for proper initialization, which would |
134 | | // then induce static constructors. Lots of static constructors. |
135 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
136 | | |
137 | | void |
138 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
139 | | |
140 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
141 | 0 | { |
142 | 0 | /* Get the interface prototype object for this class. This will create the |
143 | 0 | object as needed. */ |
144 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::Exception, |
145 | 0 | &CreateInterfaceObjects, |
146 | 0 | /* aDefineOnGlobal = */ true); |
147 | 0 |
|
148 | 0 | } |
149 | | |
150 | | } // namespace Exception_Binding |
151 | | |
152 | | |
153 | | |
154 | | } // namespace dom |
155 | | } // namespace mozilla |
156 | | |
157 | | #endif // mozilla_dom_DOMExceptionBinding_h |