Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/PermissionStatusBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM PermissionStatus.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_PermissionStatusBinding_h
4
#define mozilla_dom_PermissionStatusBinding_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 PermissionStatus;
19
struct PermissionStatusAtoms;
20
class ProtoAndIfaceCache;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class PermissionState : uint8_t {
29
  Granted,
30
  Denied,
31
  Prompt,
32
  EndGuard_
33
};
34
35
namespace PermissionStateValues {
36
extern const EnumEntry strings[4];
37
} // namespace PermissionStateValues
38
39
bool
40
ToJSValue(JSContext* aCx, PermissionState aArgument, JS::MutableHandle<JS::Value> aValue);
41
42
43
namespace PermissionStatus_Binding {
44
45
  typedef mozilla::dom::PermissionStatus NativeType;
46
47
  const JSClass*
48
  GetJSClass();
49
50
  bool
51
  Wrap(JSContext* aCx, mozilla::dom::PermissionStatus* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
52
53
  template <class T>
54
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
55
0
  {
56
0
    JS::Rooted<JSObject*> reflector(aCx);
57
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
58
0
  }
59
60
  // We declare this as an array so that retrieving a pointer to this
61
  // binding's property hooks only requires compile/link-time resolvable
62
  // address arithmetic.  Declaring it as a pointer instead would require
63
  // doing a run-time load to fetch a pointer to this binding's property
64
  // hooks.  And then structures which embedded a pointer to this structure
65
  // would require a run-time load for proper initialization, which would
66
  // then induce static constructors.  Lots of static constructors.
67
  extern const NativePropertyHooks sNativePropertyHooks[];
68
69
  void
70
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
71
72
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
73
0
  {
74
0
    /* Get the interface prototype object for this class.  This will create the
75
0
       object as needed. */
76
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::PermissionStatus,
77
0
                                       &CreateInterfaceObjects,
78
0
                                       /* aDefineOnGlobal = */ true);
79
0
80
0
  }
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::PermissionStatus,
88
0
                                       &CreateInterfaceObjects,
89
0
                                       aDefineOnGlobal);
90
0
  }
91
92
  JSObject*
93
  GetConstructorObject(JSContext* aCx);
94
95
} // namespace PermissionStatus_Binding
96
97
98
99
} // namespace dom
100
} // namespace mozilla
101
102
#endif // mozilla_dom_PermissionStatusBinding_h