Coverage Report

Created: 2018-09-25 14:53

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