Coverage Report

Created: 2018-09-25 14:53

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