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