no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / xpcom / tests / SizeTest05.cpp
blob4c813a0dc386625bc75157578089a285bd328214
1 // Test05.cpp
3 #include "nsINode.h"
4 #include "nsCOMPtr.h"
6 NS_DEF_PTR(nsINode);
8 /*
9 Windows:
10 raw, nsCOMPtr 21 bytes
12 Macintosh:
13 Raw, nsCOMPtr 64 bytes
16 class Test05_Raw {
17 public:
18 Test05_Raw();
19 ~Test05_Raw();
21 void /*nsresult*/ GetNode(nsINode** aNode);
23 private:
24 nsINode* mNode;
27 Test05_Raw::Test05_Raw() : mNode(0) {
28 // nothing else to do here
31 Test05_Raw::~Test05_Raw() { NS_IF_RELEASE(mNode); }
33 void // nsresult
34 Test05_Raw::GetNode(nsINode** aNode)
35 // m64, w21
37 // if ( !aNode )
38 // return NS_ERROR_NULL_POINTER;
40 *aNode = mNode;
41 NS_IF_ADDREF(*aNode);
43 // return NS_OK;
46 class Test05_nsCOMPtr {
47 public:
48 void /*nsresult*/ GetNode(nsINode** aNode);
50 private:
51 nsCOMPtr<nsINode> mNode;
54 void // nsresult
55 Test05_nsCOMPtr::GetNode(nsINode** aNode)
56 // m64, w21
58 // if ( !aNode )
59 // return NS_ERROR_NULL_POINTER;
61 *aNode = mNode;
62 NS_IF_ADDREF(*aNode);
64 // return NS_OK;