Coverage Report

Created: 2018-09-25 14:53

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