Coverage Report

Created: 2018-09-25 14:53

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