/work/obj-fuzz/dist/include/mozilla/dom/DOMStringMapBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM DOMStringMap.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_DOMStringMapBinding_h |
4 | | #define mozilla_dom_DOMStringMapBinding_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 | | class nsDOMStringMap; |
15 | | struct nsDOMStringMapAtoms; |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | struct NativePropertyHooks; |
21 | | class ProtoAndIfaceCache; |
22 | | |
23 | | } // namespace dom |
24 | | } // namespace mozilla |
25 | | |
26 | | namespace mozilla { |
27 | | namespace dom { |
28 | | |
29 | | namespace DOMStringMap_Binding { |
30 | | |
31 | | typedef nsDOMStringMap NativeType; |
32 | | |
33 | | bool |
34 | | Wrap(JSContext* aCx, nsDOMStringMap* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
35 | | |
36 | | template <class T> |
37 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
38 | 0 | { |
39 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
40 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
41 | 0 | } |
42 | | |
43 | | // We declare this as an array so that retrieving a pointer to this |
44 | | // binding's property hooks only requires compile/link-time resolvable |
45 | | // address arithmetic. Declaring it as a pointer instead would require |
46 | | // doing a run-time load to fetch a pointer to this binding's property |
47 | | // hooks. And then structures which embedded a pointer to this structure |
48 | | // would require a run-time load for proper initialization, which would |
49 | | // then induce static constructors. Lots of static constructors. |
50 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
51 | | |
52 | | void |
53 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
54 | | |
55 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
56 | 0 | { |
57 | 0 | /* Get the interface prototype object for this class. This will create the |
58 | 0 | object as needed. */ |
59 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::DOMStringMap, |
60 | 0 | &CreateInterfaceObjects, |
61 | 0 | /* aDefineOnGlobal = */ true); |
62 | 0 |
|
63 | 0 | } |
64 | | |
65 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
66 | 0 | { |
67 | 0 | /* Get the interface object for this class. This will create the object as |
68 | 0 | needed. */ |
69 | 0 |
|
70 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::DOMStringMap, |
71 | 0 | &CreateInterfaceObjects, |
72 | 0 | aDefineOnGlobal); |
73 | 0 | } |
74 | | |
75 | | JSObject* |
76 | | GetConstructorObject(JSContext* aCx); |
77 | | |
78 | | } // namespace DOMStringMap_Binding |
79 | | |
80 | | |
81 | | |
82 | | } // namespace dom |
83 | | } // namespace mozilla |
84 | | |
85 | | #endif // mozilla_dom_DOMStringMapBinding_h |