Line data Source code
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 "IDBTransactionBinding.h"
7 : #include "StorageTypeBinding.h"
8 : #include "js/RootingAPI.h"
9 : #include "jspubtd.h"
10 : #include "mozilla/ErrorResult.h"
11 : #include "mozilla/dom/BindingDeclarations.h"
12 : #include "mozilla/dom/Nullable.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : class IDBDatabase;
18 : struct IDBDatabaseAtoms;
19 : struct NativePropertyHooks;
20 : class ProtoAndIfaceCache;
21 :
22 : } // namespace dom
23 : } // namespace mozilla
24 :
25 : namespace mozilla {
26 : namespace dom {
27 :
28 : namespace IDBDatabaseBinding {
29 :
30 : typedef mozilla::dom::IDBDatabase NativeType;
31 :
32 : JSObject*
33 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
34 :
35 : const JSClass*
36 : GetJSClass();
37 :
38 : bool
39 : Wrap(JSContext* aCx, mozilla::dom::IDBDatabase* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
40 :
41 : template <class T>
42 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
43 : {
44 0 : JS::Rooted<JSObject*> reflector(aCx);
45 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
46 : }
47 :
48 : // We declare this as an array so that retrieving a pointer to this
49 : // binding's property hooks only requires compile/link-time resolvable
50 : // address arithmetic. Declaring it as a pointer instead would require
51 : // doing a run-time load to fetch a pointer to this binding's property
52 : // hooks. And then structures which embedded a pointer to this structure
53 : // would require a run-time load for proper initialization, which would
54 : // then induce static constructors. Lots of static constructors.
55 : extern const NativePropertyHooks sNativePropertyHooks[];
56 :
57 : void
58 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
59 :
60 : JS::Handle<JSObject*>
61 : GetProtoObjectHandle(JSContext* aCx);
62 :
63 : JS::Handle<JSObject*>
64 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
65 :
66 : JSObject*
67 : GetConstructorObject(JSContext* aCx);
68 :
69 : } // namespace IDBDatabaseBinding
70 :
71 :
72 :
73 : } // namespace dom
74 : } // namespace mozilla
75 :
76 : #endif // mozilla_dom_IDBDatabaseBinding_h
|