Coverage Report

Created: 2018-09-25 14:53

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