- Timestamp:
- May 7, 2010 1:31:09 PM (15 years ago)
- Location:
- trunk/src/libs/xpcom18a4/java
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/java/src/nsJavaXPCOMBindingUtils.cpp
r29140 r29212 926 926 GetJNIEnv() 927 927 { 928 JNIEnv* env ;928 JNIEnv* env = nsnull; 929 929 jint rc = gCachedJVM->GetEnv((void**) &env, JNI_VERSION_1_2); 930 #ifdef VBOX 931 if (env == nsnull) 932 { 933 rc = gCachedJVM->AttachCurrentThreadAsDaemon((void**)&env, nsnull); 934 printf("attaching\n"); 935 } 936 #endif 930 937 NS_ASSERTION(rc == JNI_OK && env != nsnull, 931 938 "Current thread not attached to given JVM instance"); -
trunk/src/libs/xpcom18a4/java/src/nsJavaXPCOMGlue.cpp
r29185 r29212 128 128 nsIXPTCProxy* mOuter; 129 129 public: 130 NS_DECL_ISUPPORTS 130 NS_DECL_ISUPPORTS_INHERITED 131 131 132 132 nsXPTCJStub(REFNSIID aIID, nsIXPTCProxy* aOuter, nsIInterfaceInfo* ii) … … 141 141 { 142 142 //if (mOuter) 143 // 143 // mOuter->Release(); 144 144 } 145 145 … … 158 158 }; 159 159 160 NS_IMPL_ADDREF(nsXPTCJStub) 161 NS_IMPL_RELEASE(nsXPTCJStub) 160 NS_IMETHODIMP_(nsrefcnt) 161 nsXPTCJStub::AddRef() 162 { 163 return mOuter->AddRef(); 164 } 165 166 NS_IMETHODIMP_(nsrefcnt) 167 nsXPTCJStub::Release() 168 { 169 return mOuter->Release(); 170 } 162 171 163 172 NS_IMETHODIMP nsXPTCJStub::QueryInterface(REFNSIID aIID, void** aInstancePtr) 164 173 { 174 nsIID* mIID; 175 mII->GetInterfaceIID(&mIID); 176 177 if (mIID->Equals(aIID)) { 178 NS_ADDREF_THIS(); 179 *aInstancePtr = static_cast<nsISupports*>(this); 180 return NS_OK; 181 } 182 165 183 return mOuter->QueryInterface(aIID, aInstancePtr); 166 184 } … … 197 215 if (!newbase) 198 216 return NS_ERROR_OUT_OF_MEMORY; 199 200 217 *aResult = newbase; 201 218 #endif -
trunk/src/libs/xpcom18a4/java/src/org/virtualbox/VirtualBoxManager.java
r29185 r29212 111 111 progressBar(p, timeout); 112 112 session.close(); 113 114 113 return true; 115 114 } -
trunk/src/libs/xpcom18a4/java/tests/TestVBox.java
r29186 r29212 68 68 } 69 69 70 VBoxCallbacks vboxCallbacks = new VBoxCallbacks(); 71 vbox.registerCallback(mgr.makeVirtualBoxCallback(vboxCallbacks)); 70 boolean withCallbacks = false; 71 VBoxCallbacks vboxCallbacks = null; 72 73 if (withCallbacks) 74 { 75 vboxCallbacks = new VBoxCallbacks(); 76 vbox.registerCallback(mgr.makeVirtualBoxCallback(vboxCallbacks)); 77 } 72 78 73 79 /* do something silly, start the first VM in the list */ 74 80 String m = machs[0].getName(); 75 81 System.out.println("\nAttempting to start VM '" + m + "'"); 76 if ( mgr.startVm(m, 7000))82 if (false || mgr.startVm(m, 7000)) 77 83 { 78 if ( false)84 if (!withCallbacks) 79 85 { 80 86 System.out.println("started, presss any key..."); … … 92 98 } 93 99 94 vbox.unregisterCallback(vboxCallbacks); 100 if (withCallbacks) 101 vbox.unregisterCallback(vboxCallbacks); 95 102 } 96 103 catch (Throwable e)
Note:
See TracChangeset
for help on using the changeset viewer.