Coverage Report

Created: 2018-09-25 14:53

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