Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIXPConnect.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/js/xpconnect/idl/nsIXPConnect.idl
3
 */
4
5
#ifndef __gen_nsIXPConnect_h__
6
#define __gen_nsIXPConnect_h__
7
8
9
#ifndef __gen_nsISupports_h__
10
#include "nsISupports.h"
11
#endif
12
13
#include "js/Value.h"
14
15
#include "mozilla/AlreadyAddRefed.h"
16
#include "mozilla/Assertions.h"
17
#include "mozilla/DebugOnly.h"
18
19
/* For IDL files that don't want to include root IDL files. */
20
#ifndef NS_NO_VTABLE
21
#define NS_NO_VTABLE
22
#endif
23
#include "jspubtd.h"
24
#include "js/TypeDecls.h"
25
#include "mozilla/Attributes.h"
26
#include "xptinfo.h"
27
#include "nsCOMPtr.h"
28
class nsWrapperCache;
29
class nsIPrincipal; /* forward declaration */
30
31
class nsIClassInfo; /* forward declaration */
32
33
class nsIVariant; /* forward declaration */
34
35
class nsIObjectInputStream; /* forward declaration */
36
37
class nsIObjectOutputStream; /* forward declaration */
38
39
40
/* starting interface:    nsIXPConnectJSObjectHolder */
41
#define NS_IXPCONNECTJSOBJECTHOLDER_IID_STR "73e6ff4a-ab99-4d99-ac00-ba39ccb8e4d7"
42
43
#define NS_IXPCONNECTJSOBJECTHOLDER_IID \
44
  {0x73e6ff4a, 0xab99, 0x4d99, \
45
    { 0xac, 0x00, 0xba, 0x39, 0xcc, 0xb8, 0xe4, 0xd7 }}
46
47
class NS_NO_VTABLE nsIXPConnectJSObjectHolder : public nsISupports {
48
 public:
49
50
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTJSOBJECTHOLDER_IID)
51
52
  /* [nostdcall,notxpcom] JSObjectPtr GetJSObject (); */
53
  virtual JSObject * GetJSObject(void) = 0;
54
55
};
56
57
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectJSObjectHolder, NS_IXPCONNECTJSOBJECTHOLDER_IID)
58
59
/* Use this macro when declaring classes that implement this interface. */
60
#define NS_DECL_NSIXPCONNECTJSOBJECTHOLDER \
61
  virtual JSObject * GetJSObject(void) override; 
62
63
/* Use this macro when declaring the members of this interface when the
64
   class doesn't implement the interface. This is useful for forwarding. */
65
#define NS_DECL_NON_VIRTUAL_NSIXPCONNECTJSOBJECTHOLDER \
66
  JSObject * GetJSObject(void); 
67
68
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
69
#define NS_FORWARD_NSIXPCONNECTJSOBJECTHOLDER(_to) \
70
  virtual JSObject * GetJSObject(void) override { return _to GetJSObject(); } 
71
72
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
73
#define NS_FORWARD_SAFE_NSIXPCONNECTJSOBJECTHOLDER(_to) \
74
  virtual JSObject * GetJSObject(void) override; 
75
76
77
/* starting interface:    nsIXPConnectWrappedNative */
78
#define NS_IXPCONNECTWRAPPEDNATIVE_IID_STR "e787be29-db5d-4a45-a3d6-1de1d6b85c30"
79
80
#define NS_IXPCONNECTWRAPPEDNATIVE_IID \
81
  {0xe787be29, 0xdb5d, 0x4a45, \
82
    { 0xa3, 0xd6, 0x1d, 0xe1, 0xd6, 0xb8, 0x5c, 0x30 }}
83
84
class nsIXPConnectWrappedNative : public nsIXPConnectJSObjectHolder {
85
 public:
86
87
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDNATIVE_IID)
88
89
  /* void debugDump (in short depth); */
90
  NS_IMETHOD DebugDump(int16_t depth) = 0;
91
92
     /**
93
     * Faster access to the native object from C++.  Will never return null.
94
     */
95
1.62M
    nsISupports* Native() const { return mIdentity; }
96
protected:
97
    nsCOMPtr<nsISupports> mIdentity;
98
public:
99
};
100
101
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedNative, NS_IXPCONNECTWRAPPEDNATIVE_IID)
102
103
/* Use this macro when declaring classes that implement this interface. */
104
#define NS_DECL_NSIXPCONNECTWRAPPEDNATIVE \
105
  NS_IMETHOD DebugDump(int16_t depth) override; \
106
107
/* Use this macro when declaring the members of this interface when the
108
   class doesn't implement the interface. This is useful for forwarding. */
109
#define NS_DECL_NON_VIRTUAL_NSIXPCONNECTWRAPPEDNATIVE \
110
  nsresult DebugDump(int16_t depth); \
111
112
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
113
#define NS_FORWARD_NSIXPCONNECTWRAPPEDNATIVE(_to) \
114
  NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \
115
116
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
117
#define NS_FORWARD_SAFE_NSIXPCONNECTWRAPPEDNATIVE(_to) \
118
  NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \
119
120
121
inline
122
const nsQueryInterface
123
do_QueryWrappedNative(nsIXPConnectWrappedNative *aWrappedNative)
124
2
{
125
2
    return nsQueryInterface(aWrappedNative->Native());
126
2
}
127
inline
128
const nsQueryInterfaceWithError
129
do_QueryWrappedNative(nsIXPConnectWrappedNative *aWrappedNative,
130
                      nsresult *aError)
131
0
{
132
0
    return nsQueryInterfaceWithError(aWrappedNative->Native(), aError);
133
0
}
134
135
/* starting interface:    nsIXPConnectWrappedJS */
136
#define NS_IXPCONNECTWRAPPEDJS_IID_STR "3a01b0d6-074b-49ed-bac3-08c76366cae4"
137
138
#define NS_IXPCONNECTWRAPPEDJS_IID \
139
  {0x3a01b0d6, 0x074b, 0x49ed, \
140
    { 0xba, 0xc3, 0x08, 0xc7, 0x63, 0x66, 0xca, 0xe4 }}
141
142
class NS_NO_VTABLE nsIXPConnectWrappedJS : public nsIXPConnectJSObjectHolder {
143
 public:
144
145
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDJS_IID)
146
147
  /* readonly attribute InterfaceInfoPtr InterfaceInfo; */
148
  NS_IMETHOD GetInterfaceInfo(const nsXPTInterfaceInfo * * aInterfaceInfo) = 0;
149
150
  /* readonly attribute nsIIDPtr InterfaceIID; */
151
  NS_IMETHOD GetInterfaceIID(nsIID * * aInterfaceIID) = 0;
152
153
  /* [nostdcall,notxpcom] JSObjectPtr GetJSObjectGlobal (); */
154
  virtual JSObject * GetJSObjectGlobal(void) = 0;
155
156
  /* void debugDump (in short depth); */
157
  NS_IMETHOD DebugDump(int16_t depth) = 0;
158
159
  /* void aggregatedQueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
160
  NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void * * result) = 0;
161
162
};
163
164
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJS, NS_IXPCONNECTWRAPPEDJS_IID)
165
166
/* Use this macro when declaring classes that implement this interface. */
167
#define NS_DECL_NSIXPCONNECTWRAPPEDJS \
168
  NS_IMETHOD GetInterfaceInfo(const nsXPTInterfaceInfo * * aInterfaceInfo) override; \
169
  NS_IMETHOD GetInterfaceIID(nsIID * * aInterfaceIID) override; \
170
  virtual JSObject * GetJSObjectGlobal(void) override; \
171
  NS_IMETHOD DebugDump(int16_t depth) override; \
172
  NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void * * result) override; 
173
174
/* Use this macro when declaring the members of this interface when the
175
   class doesn't implement the interface. This is useful for forwarding. */
176
#define NS_DECL_NON_VIRTUAL_NSIXPCONNECTWRAPPEDJS \
177
  nsresult GetInterfaceInfo(const nsXPTInterfaceInfo * * aInterfaceInfo); \
178
  nsresult GetInterfaceIID(nsIID * * aInterfaceIID); \
179
  JSObject * GetJSObjectGlobal(void); \
180
  nsresult DebugDump(int16_t depth); \
181
  nsresult AggregatedQueryInterface(const nsIID & uuid, void * * result); 
182
183
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
184
#define NS_FORWARD_NSIXPCONNECTWRAPPEDJS(_to) \
185
  NS_IMETHOD GetInterfaceInfo(const nsXPTInterfaceInfo * * aInterfaceInfo) override { return _to GetInterfaceInfo(aInterfaceInfo); } \
186
  NS_IMETHOD GetInterfaceIID(nsIID * * aInterfaceIID) override { return _to GetInterfaceIID(aInterfaceIID); } \
187
  virtual JSObject * GetJSObjectGlobal(void) override { return _to GetJSObjectGlobal(); } \
188
  NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \
189
  NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void * * result) override { return _to AggregatedQueryInterface(uuid, result); } 
190
191
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
192
#define NS_FORWARD_SAFE_NSIXPCONNECTWRAPPEDJS(_to) \
193
  NS_IMETHOD GetInterfaceInfo(const nsXPTInterfaceInfo * * aInterfaceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaceInfo(aInterfaceInfo); } \
194
  NS_IMETHOD GetInterfaceIID(nsIID * * aInterfaceIID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaceIID(aInterfaceIID); } \
195
  virtual JSObject * GetJSObjectGlobal(void) override; \
196
  NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \
197
  NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void * * result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AggregatedQueryInterface(uuid, result); } 
198
199
200
/* starting interface:    nsIXPConnectWrappedJSUnmarkGray */
201
#define NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID_STR "c02a0ce6-275f-4ea1-9c23-08494898b070"
202
203
#define NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID \
204
  {0xc02a0ce6, 0x275f, 0x4ea1, \
205
    { 0x9c, 0x23, 0x08, 0x49, 0x48, 0x98, 0xb0, 0x70 }}
206
207
class NS_NO_VTABLE nsIXPConnectWrappedJSUnmarkGray : public nsIXPConnectWrappedJS {
208
 public:
209
210
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID)
211
212
};
213
214
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJSUnmarkGray, NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID)
215
216
/* Use this macro when declaring classes that implement this interface. */
217
#define NS_DECL_NSIXPCONNECTWRAPPEDJSUNMARKGRAY \
218
  /* no methods! */
219
220
/* Use this macro when declaring the members of this interface when the
221
   class doesn't implement the interface. This is useful for forwarding. */
222
#define NS_DECL_NON_VIRTUAL_NSIXPCONNECTWRAPPEDJSUNMARKGRAY \
223
  /* no methods! */
224
225
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
226
#define NS_FORWARD_NSIXPCONNECTWRAPPEDJSUNMARKGRAY(_to) \
227
  /* no methods! */
228
229
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
230
#define NS_FORWARD_SAFE_NSIXPCONNECTWRAPPEDJSUNMARKGRAY(_to) \
231
  /* no methods! */
232
233
234
/* starting interface:    nsIXPCWrappedJSObjectGetter */
235
#define NS_IXPCWRAPPEDJSOBJECTGETTER_IID_STR "254bb2e0-6439-11d4-8fe0-0010a4e73d9a"
236
237
#define NS_IXPCWRAPPEDJSOBJECTGETTER_IID \
238
  {0x254bb2e0, 0x6439, 0x11d4, \
239
    { 0x8f, 0xe0, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }}
240
241
class NS_NO_VTABLE nsIXPCWrappedJSObjectGetter : public nsISupports {
242
 public:
243
244
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCWRAPPEDJSOBJECTGETTER_IID)
245
246
  /* readonly attribute nsISupports neverCalled; */
247
  NS_IMETHOD GetNeverCalled(nsISupports **aNeverCalled) = 0;
248
249
};
250
251
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPCWrappedJSObjectGetter, NS_IXPCWRAPPEDJSOBJECTGETTER_IID)
252
253
/* Use this macro when declaring classes that implement this interface. */
254
#define NS_DECL_NSIXPCWRAPPEDJSOBJECTGETTER \
255
  NS_IMETHOD GetNeverCalled(nsISupports **aNeverCalled) override; 
256
257
/* Use this macro when declaring the members of this interface when the
258
   class doesn't implement the interface. This is useful for forwarding. */
259
#define NS_DECL_NON_VIRTUAL_NSIXPCWRAPPEDJSOBJECTGETTER \
260
  nsresult GetNeverCalled(nsISupports **aNeverCalled); 
261
262
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
263
#define NS_FORWARD_NSIXPCWRAPPEDJSOBJECTGETTER(_to) \
264
  NS_IMETHOD GetNeverCalled(nsISupports **aNeverCalled) override { return _to GetNeverCalled(aNeverCalled); } 
265
266
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
267
#define NS_FORWARD_SAFE_NSIXPCWRAPPEDJSOBJECTGETTER(_to) \
268
  NS_IMETHOD GetNeverCalled(nsISupports **aNeverCalled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNeverCalled(aNeverCalled); } 
269
270
271
/* starting interface:    nsIXPConnect */
272
#define NS_IXPCONNECT_IID_STR "768507b5-b981-40c7-8276-f6a1da502a24"
273
274
#define NS_IXPCONNECT_IID \
275
  {0x768507b5, 0xb981, 0x40c7, \
276
    { 0x82, 0x76, 0xf6, 0xa1, 0xda, 0x50, 0x2a, 0x24 }}
277
278
class nsIXPConnect : public nsISupports {
279
 public:
280
281
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECT_IID)
282
283
     // This gets a non-addref'd pointer.
284
    static nsIXPConnect* XPConnect();
285
  /* JSObjectPtr wrapNative (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */
286
  NS_IMETHOD WrapNative(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, const nsIID & aIID, JSObject * * _retval) = 0;
287
288
  /* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsWrapperCachePtr aCache, in nsIIDPtr aIID, in boolean aAllowWrapper, out jsval aVal); */
289
  NS_IMETHOD WrapNativeToJSVal(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, nsWrapperCache * aCache, const nsIID * aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) = 0;
290
291
  /* void wrapJS (in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
292
  NS_IMETHOD WrapJS(JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) = 0;
293
294
  /* nsIVariant jSValToVariant (in JSContextPtr cx, in jsval aJSVal); */
295
  NS_IMETHOD JSValToVariant(JSContext * cx, JS::HandleValue aJSVal, nsIVariant **_retval) = 0;
296
297
  /* nsIXPConnectWrappedNative getWrappedNativeOfJSObject (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */
298
  NS_IMETHOD GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObj, nsIXPConnectWrappedNative **_retval) = 0;
299
300
  /* void debugDump (in short depth); */
301
  NS_IMETHOD DebugDump(int16_t depth) = 0;
302
303
  /* void debugDumpObject (in nsISupports aCOMObj, in short depth); */
304
  NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) = 0;
305
306
  /* void debugDumpJSStack (in boolean showArgs, in boolean showLocals, in boolean showThisProps); */
307
  NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) = 0;
308
309
  /* void wrapJSAggregatedToNative (in nsISupports aOuter, in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
310
  NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) = 0;
311
312
  /* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */
313
  NS_IMETHOD VariantToJS(JSContext * ctx, JSObject * scope, nsIVariant *value, JS::MutableHandleValue _retval) = 0;
314
315
  /* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */
316
  NS_IMETHOD JSToVariant(JSContext * ctx, JS::HandleValue value, nsIVariant **_retval) = 0;
317
318
  /* [noscript] JSObjectPtr createSandbox (in JSContextPtr cx, in nsIPrincipal principal); */
319
  NS_IMETHOD CreateSandbox(JSContext * cx, nsIPrincipal *principal, JSObject * * _retval) = 0;
320
321
  /* [noscript] jsval evalInSandboxObject (in AString source, in string filename, in JSContextPtr cx, in JSObjectPtr sandbox); */
322
  NS_IMETHOD EvalInSandboxObject(const nsAString& source, const char * filename, JSContext * cx, JSObject * sandbox, JS::MutableHandleValue _retval) = 0;
323
324
  /* [noscript] void writeScript (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSScriptPtr aJSScript); */
325
  NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSScript * aJSScript) = 0;
326
327
  /* [noscript] JSScriptPtr readScript (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */
328
  NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext * aJSContext, JSScript * * _retval) = 0;
329
330
  /* [noscript] void writeFunction (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSObjectPtr aJSObject); */
331
  NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSObject * aJSObject) = 0;
332
333
  /* [noscript] JSObjectPtr readFunction (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */
334
  NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext * aJSContext, JSObject * * _retval) = 0;
335
336
  /* [infallible] readonly attribute boolean isShuttingDown; */
337
  NS_IMETHOD GetIsShuttingDown(bool *aIsShuttingDown) = 0;
338
  inline bool GetIsShuttingDown()
339
18
  {
340
18
    bool result;
341
18
    mozilla::DebugOnly<nsresult> rv = GetIsShuttingDown(&result);
342
18
    MOZ_ASSERT(NS_SUCCEEDED(rv));
343
18
    return result;
344
18
  }
345
346
};
347
348
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnect, NS_IXPCONNECT_IID)
349
350
/* Use this macro when declaring classes that implement this interface. */
351
#define NS_DECL_NSIXPCONNECT \
352
  NS_IMETHOD WrapNative(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, const nsIID & aIID, JSObject * * _retval) override; \
353
  NS_IMETHOD WrapNativeToJSVal(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, nsWrapperCache * aCache, const nsIID * aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override; \
354
  NS_IMETHOD WrapJS(JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override; \
355
  NS_IMETHOD JSValToVariant(JSContext * cx, JS::HandleValue aJSVal, nsIVariant **_retval) override; \
356
  NS_IMETHOD GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObj, nsIXPConnectWrappedNative **_retval) override; \
357
  NS_IMETHOD DebugDump(int16_t depth) override; \
358
  NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override; \
359
  NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override; \
360
  NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override; \
361
  NS_IMETHOD VariantToJS(JSContext * ctx, JSObject * scope, nsIVariant *value, JS::MutableHandleValue _retval) override; \
362
  NS_IMETHOD JSToVariant(JSContext * ctx, JS::HandleValue value, nsIVariant **_retval) override; \
363
  NS_IMETHOD CreateSandbox(JSContext * cx, nsIPrincipal *principal, JSObject * * _retval) override; \
364
  NS_IMETHOD EvalInSandboxObject(const nsAString& source, const char * filename, JSContext * cx, JSObject * sandbox, JS::MutableHandleValue _retval) override; \
365
  NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSScript * aJSScript) override; \
366
  NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext * aJSContext, JSScript * * _retval) override; \
367
  NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSObject * aJSObject) override; \
368
  NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext * aJSContext, JSObject * * _retval) override; \
369
  using nsIXPConnect::GetIsShuttingDown; \
370
  NS_IMETHOD GetIsShuttingDown(bool *aIsShuttingDown) override; 
371
372
/* Use this macro when declaring the members of this interface when the
373
   class doesn't implement the interface. This is useful for forwarding. */
374
#define NS_DECL_NON_VIRTUAL_NSIXPCONNECT \
375
  nsresult WrapNative(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, const nsIID & aIID, JSObject * * _retval); \
376
  nsresult WrapNativeToJSVal(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, nsWrapperCache * aCache, const nsIID * aIID, bool aAllowWrapper, JS::MutableHandleValue aVal); \
377
  nsresult WrapJS(JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result); \
378
  nsresult JSValToVariant(JSContext * cx, JS::HandleValue aJSVal, nsIVariant **_retval); \
379
  nsresult GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObj, nsIXPConnectWrappedNative **_retval); \
380
  nsresult DebugDump(int16_t depth); \
381
  nsresult DebugDumpObject(nsISupports *aCOMObj, int16_t depth); \
382
  nsresult DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps); \
383
  nsresult WrapJSAggregatedToNative(nsISupports *aOuter, JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result); \
384
  nsresult VariantToJS(JSContext * ctx, JSObject * scope, nsIVariant *value, JS::MutableHandleValue _retval); \
385
  nsresult JSToVariant(JSContext * ctx, JS::HandleValue value, nsIVariant **_retval); \
386
  nsresult CreateSandbox(JSContext * cx, nsIPrincipal *principal, JSObject * * _retval); \
387
  nsresult EvalInSandboxObject(const nsAString& source, const char * filename, JSContext * cx, JSObject * sandbox, JS::MutableHandleValue _retval); \
388
  nsresult WriteScript(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSScript * aJSScript); \
389
  nsresult ReadScript(nsIObjectInputStream *aStream, JSContext * aJSContext, JSScript * * _retval); \
390
  nsresult WriteFunction(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSObject * aJSObject); \
391
  nsresult ReadFunction(nsIObjectInputStream *aStream, JSContext * aJSContext, JSObject * * _retval); \
392
  using nsIXPConnect::GetIsShuttingDown; \
393
  nsresult GetIsShuttingDown(bool *aIsShuttingDown); 
394
395
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
396
#define NS_FORWARD_NSIXPCONNECT(_to) \
397
  NS_IMETHOD WrapNative(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, const nsIID & aIID, JSObject * * _retval) override { return _to WrapNative(aJSContext, aScope, aCOMObj, aIID, _retval); } \
398
  NS_IMETHOD WrapNativeToJSVal(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, nsWrapperCache * aCache, const nsIID * aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override { return _to WrapNativeToJSVal(aJSContext, aScope, aCOMObj, aCache, aIID, aAllowWrapper, aVal); } \
399
  NS_IMETHOD WrapJS(JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override { return _to WrapJS(aJSContext, aJSObj, aIID, result); } \
400
  NS_IMETHOD JSValToVariant(JSContext * cx, JS::HandleValue aJSVal, nsIVariant **_retval) override { return _to JSValToVariant(cx, aJSVal, _retval); } \
401
  NS_IMETHOD GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObj, nsIXPConnectWrappedNative **_retval) override { return _to GetWrappedNativeOfJSObject(aJSContext, aJSObj, _retval); } \
402
  NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \
403
  NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override { return _to DebugDumpObject(aCOMObj, depth); } \
404
  NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override { return _to DebugDumpJSStack(showArgs, showLocals, showThisProps); } \
405
  NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override { return _to WrapJSAggregatedToNative(aOuter, aJSContext, aJSObj, aIID, result); } \
406
  NS_IMETHOD VariantToJS(JSContext * ctx, JSObject * scope, nsIVariant *value, JS::MutableHandleValue _retval) override { return _to VariantToJS(ctx, scope, value, _retval); } \
407
  NS_IMETHOD JSToVariant(JSContext * ctx, JS::HandleValue value, nsIVariant **_retval) override { return _to JSToVariant(ctx, value, _retval); } \
408
  NS_IMETHOD CreateSandbox(JSContext * cx, nsIPrincipal *principal, JSObject * * _retval) override { return _to CreateSandbox(cx, principal, _retval); } \
409
  NS_IMETHOD EvalInSandboxObject(const nsAString& source, const char * filename, JSContext * cx, JSObject * sandbox, JS::MutableHandleValue _retval) override { return _to EvalInSandboxObject(source, filename, cx, sandbox, _retval); } \
410
  NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSScript * aJSScript) override { return _to WriteScript(aStream, aJSContext, aJSScript); } \
411
  NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext * aJSContext, JSScript * * _retval) override { return _to ReadScript(aStream, aJSContext, _retval); } \
412
  NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSObject * aJSObject) override { return _to WriteFunction(aStream, aJSContext, aJSObject); } \
413
  NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext * aJSContext, JSObject * * _retval) override { return _to ReadFunction(aStream, aJSContext, _retval); } \
414
  using nsIXPConnect::GetIsShuttingDown; \
415
  NS_IMETHOD GetIsShuttingDown(bool *aIsShuttingDown) override { return _to GetIsShuttingDown(aIsShuttingDown); } 
416
417
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
418
#define NS_FORWARD_SAFE_NSIXPCONNECT(_to) \
419
  NS_IMETHOD WrapNative(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, const nsIID & aIID, JSObject * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapNative(aJSContext, aScope, aCOMObj, aIID, _retval); } \
420
  NS_IMETHOD WrapNativeToJSVal(JSContext * aJSContext, JSObject * aScope, nsISupports *aCOMObj, nsWrapperCache * aCache, const nsIID * aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapNativeToJSVal(aJSContext, aScope, aCOMObj, aCache, aIID, aAllowWrapper, aVal); } \
421
  NS_IMETHOD WrapJS(JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapJS(aJSContext, aJSObj, aIID, result); } \
422
  NS_IMETHOD JSValToVariant(JSContext * cx, JS::HandleValue aJSVal, nsIVariant **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JSValToVariant(cx, aJSVal, _retval); } \
423
  NS_IMETHOD GetWrappedNativeOfJSObject(JSContext * aJSContext, JSObject * aJSObj, nsIXPConnectWrappedNative **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrappedNativeOfJSObject(aJSContext, aJSObj, _retval); } \
424
  NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \
425
  NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDumpObject(aCOMObj, depth); } \
426
  NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDumpJSStack(showArgs, showLocals, showThisProps); } \
427
  NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext * aJSContext, JSObject * aJSObj, const nsIID & aIID, void * * result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapJSAggregatedToNative(aOuter, aJSContext, aJSObj, aIID, result); } \
428
  NS_IMETHOD VariantToJS(JSContext * ctx, JSObject * scope, nsIVariant *value, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VariantToJS(ctx, scope, value, _retval); } \
429
  NS_IMETHOD JSToVariant(JSContext * ctx, JS::HandleValue value, nsIVariant **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JSToVariant(ctx, value, _retval); } \
430
  NS_IMETHOD CreateSandbox(JSContext * cx, nsIPrincipal *principal, JSObject * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSandbox(cx, principal, _retval); } \
431
  NS_IMETHOD EvalInSandboxObject(const nsAString& source, const char * filename, JSContext * cx, JSObject * sandbox, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EvalInSandboxObject(source, filename, cx, sandbox, _retval); } \
432
  NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSScript * aJSScript) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteScript(aStream, aJSContext, aJSScript); } \
433
  NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext * aJSContext, JSScript * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadScript(aStream, aJSContext, _retval); } \
434
  NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext * aJSContext, JSObject * aJSObject) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFunction(aStream, aJSContext, aJSObject); } \
435
  NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext * aJSContext, JSObject * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadFunction(aStream, aJSContext, _retval); } \
436
  NS_IMETHOD GetIsShuttingDown(bool *aIsShuttingDown) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsShuttingDown(aIsShuttingDown); } 
437
438
439
#endif /* __gen_nsIXPConnect_h__ */