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