/work/obj-fuzz/dist/include/mozilla/dom/FocusEventBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM FocusEvent.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_FocusEventBinding_h |
4 | | #define mozilla_dom_FocusEventBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "UIEventBinding.h" |
8 | | #include "js/RootingAPI.h" |
9 | | #include "jspubtd.h" |
10 | | #include "mozilla/ErrorResult.h" |
11 | | #include "mozilla/dom/BindingDeclarations.h" |
12 | | #include "mozilla/dom/EventTarget.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrototypeList.h" |
15 | | #include "nsGlobalWindow.h" |
16 | | |
17 | | class nsGlobalWindowInner; |
18 | | |
19 | | namespace mozilla { |
20 | | namespace dom { |
21 | | |
22 | | class EventTarget; |
23 | | class FocusEvent; |
24 | | struct FocusEventAtoms; |
25 | | struct FocusEventInitAtoms; |
26 | | struct NativePropertyHooks; |
27 | | class ProtoAndIfaceCache; |
28 | | |
29 | | } // namespace dom |
30 | | } // namespace mozilla |
31 | | |
32 | | namespace mozilla { |
33 | | namespace dom { |
34 | | |
35 | | struct FocusEventInit : public UIEventInit |
36 | | { |
37 | | MOZ_INIT_OUTSIDE_CTOR RefPtr<mozilla::dom::EventTarget> mRelatedTarget; |
38 | | |
39 | | FocusEventInit(); |
40 | | |
41 | | explicit inline FocusEventInit(const FastDictionaryInitializer& ) |
42 | | : UIEventInit(FastDictionaryInitializer()) |
43 | 0 | { |
44 | 0 | // Do nothing here; this is used by our "Fast" subclass |
45 | 0 | } |
46 | | |
47 | | explicit inline FocusEventInit(const FocusEventInit& aOther) |
48 | 0 | { |
49 | 0 | *this = aOther; |
50 | 0 | } |
51 | | |
52 | | bool |
53 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
54 | | |
55 | | bool |
56 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
57 | | |
58 | | void |
59 | | TraceDictionary(JSTracer* trc); |
60 | | |
61 | | inline void |
62 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
63 | 0 | { |
64 | 0 | UIEventInit::TraverseForCC(aCallback, aFlags); |
65 | 0 | ImplCycleCollectionTraverse(aCallback, mRelatedTarget, "mRelatedTarget", aFlags); |
66 | 0 | } |
67 | | |
68 | | inline void |
69 | | UnlinkForCC() |
70 | 0 | { |
71 | 0 | UIEventInit::UnlinkForCC(); |
72 | 0 | ImplCycleCollectionUnlink(mRelatedTarget); |
73 | 0 | } |
74 | | |
75 | | FocusEventInit& |
76 | | operator=(const FocusEventInit& aOther); |
77 | | |
78 | | private: |
79 | | static bool |
80 | | InitIds(JSContext* cx, FocusEventInitAtoms* atomsCache); |
81 | | }; |
82 | | |
83 | | namespace binding_detail { |
84 | | struct FastFocusEventInit : public FocusEventInit |
85 | | { |
86 | | inline FastFocusEventInit() |
87 | | : FocusEventInit(FastDictionaryInitializer()) |
88 | 0 | { |
89 | 0 | // Doesn't matter what int we pass to the parent constructor |
90 | 0 | } |
91 | | }; |
92 | | } // namespace binding_detail |
93 | | |
94 | | |
95 | | namespace FocusEvent_Binding { |
96 | | |
97 | | typedef mozilla::dom::FocusEvent NativeType; |
98 | | |
99 | | const JSClass* |
100 | | GetJSClass(); |
101 | | |
102 | | bool |
103 | | Wrap(JSContext* aCx, mozilla::dom::FocusEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
104 | | |
105 | | template <class T> |
106 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
107 | 0 | { |
108 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
109 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
110 | 0 | } |
111 | | |
112 | | // We declare this as an array so that retrieving a pointer to this |
113 | | // binding's property hooks only requires compile/link-time resolvable |
114 | | // address arithmetic. Declaring it as a pointer instead would require |
115 | | // doing a run-time load to fetch a pointer to this binding's property |
116 | | // hooks. And then structures which embedded a pointer to this structure |
117 | | // would require a run-time load for proper initialization, which would |
118 | | // then induce static constructors. Lots of static constructors. |
119 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
120 | | |
121 | | void |
122 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
123 | | |
124 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
125 | 0 | { |
126 | 0 | /* Get the interface prototype object for this class. This will create the |
127 | 0 | object as needed. */ |
128 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::FocusEvent, |
129 | 0 | &CreateInterfaceObjects, |
130 | 0 | /* aDefineOnGlobal = */ true); |
131 | 0 |
|
132 | 0 | } |
133 | | |
134 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
135 | 0 | { |
136 | 0 | /* Get the interface object for this class. This will create the object as |
137 | 0 | needed. */ |
138 | 0 |
|
139 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::FocusEvent, |
140 | 0 | &CreateInterfaceObjects, |
141 | 0 | aDefineOnGlobal); |
142 | 0 | } |
143 | | |
144 | | JSObject* |
145 | | GetConstructorObject(JSContext* aCx); |
146 | | |
147 | | } // namespace FocusEvent_Binding |
148 | | |
149 | | |
150 | | |
151 | | } // namespace dom |
152 | | } // namespace mozilla |
153 | | |
154 | | #endif // mozilla_dom_FocusEventBinding_h |