VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/vboxdeps.cpp@ 74931

最後變更 在這個檔案從74931是 74931,由 vboxsync 提交於 6 年 前

xpcom18a4: force the inclusion of nsTraceRefcnt, it is useful for mixing debug and release build binaries

  • 屬性 svn:keywords 設為 Id
檔案大小: 1.5 KB
 
1/* The usual story: drag stuff from the libraries into the link. */
2
3
4#include <plstr.h>
5#include <prio.h>
6#include <nsDeque.h>
7#include <nsHashSets.h>
8#include <nsIPipe.h>
9#include <xptcall.h>
10#include <nsProxyRelease.h>
11#include "xpcom/proxy/src/nsProxyEventPrivate.h"
12#include "nsTraceRefcnt.h"
13
14uintptr_t deps[] =
15{
16 (uintptr_t)PL_strncpy,
17 (uintptr_t)PL_strchr,
18 (uintptr_t)PL_strncpyz,
19 (uintptr_t)PL_HashString,
20 (uintptr_t)PR_DestroyPollableEvent,
21 (uintptr_t)NS_NewPipe2,
22 (uintptr_t)NS_ProxyRelease,
23 (uintptr_t)nsTraceRefcnt::LogRelease,
24 0
25};
26
27class foobardep : public nsXPTCStubBase
28{
29public:
30 NS_IMETHOD_(nsrefcnt) AddRef(void)
31 {
32 return 1;
33 }
34
35 NS_IMETHOD_(nsrefcnt) Release(void)
36 {
37 return 0;
38 }
39
40 NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo** info)
41 {
42 (void)info;
43 return 0;
44 }
45
46 // call this method and return result
47 NS_IMETHOD CallMethod(PRUint16 methodIndex, const nsXPTMethodInfo* info, nsXPTCMiniVariant* params)
48 {
49 (void)methodIndex;
50 (void)info;
51 (void)params;
52 return 0;
53 }
54
55};
56
57
58
59void foodep(void)
60{
61 nsVoidHashSetSuper *a = new nsVoidHashSetSuper();
62 a->Init(123);
63 nsDeque *b = new nsDeque((nsDequeFunctor*)0);
64
65 //nsXPTCStubBase
66 nsProxyEventObject *c = new nsProxyEventObject();
67 c->Release();
68
69 foobardep *d = new foobardep();
70 nsXPTCStubBase *e = d;
71 e->Release();
72}
73
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette