Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/ClientBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM Client.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_ClientBinding_h
4
#define mozilla_dom_ClientBinding_h
5
6
#include "ClientsBinding.h"
7
#include "DocumentBinding.h"
8
#include "GeckoProfiler.h"
9
#include "js/RootingAPI.h"
10
#include "jspubtd.h"
11
#include "mozilla/ErrorResult.h"
12
#include "mozilla/dom/BindingDeclarations.h"
13
#include "mozilla/dom/Nullable.h"
14
#include "mozilla/dom/PrototypeList.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class Client;
20
struct ClientAtoms;
21
struct NativePropertyHooks;
22
class ProtoAndIfaceCache;
23
24
} // namespace dom
25
} // namespace mozilla
26
27
namespace mozilla {
28
namespace dom {
29
30
enum class FrameType : uint8_t {
31
  Auxiliary,
32
  Top_level,
33
  Nested,
34
  None,
35
  EndGuard_
36
};
37
38
namespace FrameTypeValues {
39
extern const EnumEntry strings[5];
40
} // namespace FrameTypeValues
41
42
bool
43
ToJSValue(JSContext* aCx, FrameType aArgument, JS::MutableHandle<JS::Value> aValue);
44
45
46
namespace Client_Binding {
47
48
  typedef mozilla::dom::Client NativeType;
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::Client* 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
  void
67
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
68
69
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
70
0
  {
71
0
    /* Get the interface prototype object for this class.  This will create the
72
0
       object as needed. */
73
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::Client,
74
0
                                       &CreateInterfaceObjects,
75
0
                                       /* aDefineOnGlobal = */ true);
76
0
77
0
  }
78
79
  JSObject*
80
  GetProtoObject(JSContext* aCx);
81
82
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
83
0
  {
84
0
    /* Get the interface object for this class.  This will create the object as
85
0
       needed. */
86
0
87
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::Client,
88
0
                                       &CreateInterfaceObjects,
89
0
                                       aDefineOnGlobal);
90
0
  }
91
92
  JSObject*
93
  GetConstructorObject(JSContext* aCx);
94
95
} // namespace Client_Binding
96
97
98
99
namespace WindowClient_Binding {
100
101
  typedef mozilla::dom::Client NativeType;
102
103
  bool
104
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
105
106
  const JSClass*
107
  GetJSClass();
108
109
  bool
110
  Wrap(JSContext* aCx, mozilla::dom::Client* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
111
112
  template <class T>
113
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
114
0
  {
115
0
    JS::Rooted<JSObject*> reflector(aCx);
116
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
117
0
  }
118
119
  void
120
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
121
122
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
123
0
  {
124
0
    /* Get the interface prototype object for this class.  This will create the
125
0
       object as needed. */
126
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::WindowClient,
127
0
                                       &CreateInterfaceObjects,
128
0
                                       /* aDefineOnGlobal = */ true);
129
0
130
0
  }
131
132
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
133
0
  {
134
0
    /* Get the interface object for this class.  This will create the object as
135
0
       needed. */
136
0
137
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::WindowClient,
138
0
                                       &CreateInterfaceObjects,
139
0
                                       aDefineOnGlobal);
140
0
  }
141
142
  JSObject*
143
  GetConstructorObject(JSContext* aCx);
144
145
} // namespace WindowClient_Binding
146
147
148
149
} // namespace dom
150
} // namespace mozilla
151
152
#endif // mozilla_dom_ClientBinding_h