Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/PaymentResponseBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM PaymentResponse.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_PaymentResponseBinding_h
4
#define mozilla_dom_PaymentResponseBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class PaymentResponse;
19
struct PaymentResponseAtoms;
20
class ProtoAndIfaceCache;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class PaymentComplete : uint8_t {
29
  Success,
30
  Fail,
31
  Unknown,
32
  EndGuard_
33
};
34
35
namespace PaymentCompleteValues {
36
extern const EnumEntry strings[4];
37
} // namespace PaymentCompleteValues
38
39
bool
40
ToJSValue(JSContext* aCx, PaymentComplete aArgument, JS::MutableHandle<JS::Value> aValue);
41
42
43
namespace PaymentResponse_Binding {
44
45
  typedef mozilla::dom::PaymentResponse NativeType;
46
47
  MOZ_CAN_RUN_SCRIPT bool
48
  CollectJSONAttributes(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PaymentResponse* self, JS::Rooted<JSObject*>& result);
49
50
  bool
51
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
52
53
  const JSClass*
54
  GetJSClass();
55
56
  bool
57
  Wrap(JSContext* aCx, mozilla::dom::PaymentResponse* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
58
59
  template <class T>
60
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
61
0
  {
62
0
    JS::Rooted<JSObject*> reflector(aCx);
63
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
64
0
  }
65
66
  // We declare this as an array so that retrieving a pointer to this
67
  // binding's property hooks only requires compile/link-time resolvable
68
  // address arithmetic.  Declaring it as a pointer instead would require
69
  // doing a run-time load to fetch a pointer to this binding's property
70
  // hooks.  And then structures which embedded a pointer to this structure
71
  // would require a run-time load for proper initialization, which would
72
  // then induce static constructors.  Lots of static constructors.
73
  extern const NativePropertyHooks sNativePropertyHooks[];
74
75
  void
76
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
77
78
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
79
0
  {
80
0
    /* Get the interface prototype object for this class.  This will create the
81
0
       object as needed. */
82
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::PaymentResponse,
83
0
                                       &CreateInterfaceObjects,
84
0
                                       /* aDefineOnGlobal = */ true);
85
0
86
0
  }
87
88
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
89
0
  {
90
0
    /* Get the interface object for this class.  This will create the object as
91
0
       needed. */
92
0
93
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::PaymentResponse,
94
0
                                       &CreateInterfaceObjects,
95
0
                                       aDefineOnGlobal);
96
0
  }
97
98
  JSObject*
99
  GetConstructorObject(JSContext* aCx);
100
101
} // namespace PaymentResponse_Binding
102
103
104
105
} // namespace dom
106
} // namespace mozilla
107
108
#endif // mozilla_dom_PaymentResponseBinding_h