Coverage Report

Created: 2018-09-25 14:53

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