Changeset 31372 in vbox for trunk/src/VBox
- Timestamp:
- Aug 4, 2010 7:01:08 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64429
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r31370 r31372 1933 1933 * method call. 1934 1934 * 1935 * @param event event to post 1936 * (must be allocated using |new|, will be deleted automatically 1937 * by the event thread after processing) 1935 * @param event event to post; must have been allocated using |new|, will 1936 * be deleted automatically by the event thread after processing 1938 1937 * 1939 1938 * @note Doesn't lock any object. … … 1941 1940 HRESULT VirtualBox::postEvent(Event *event) 1942 1941 { 1943 AutoCaller autoCaller(this);1944 AssertComRCReturn(autoCaller.rc(), autoCaller.rc());1945 1946 if (autoCaller.state() != Ready)1947 {1948 LogWarningFunc(("VirtualBox has been uninitialized (state=%d), the event is discarded!\n",1949 autoCaller.state()));1950 return S_OK;1951 }1952 1953 1942 AssertReturn(event, E_FAIL); 1954 AssertReturn(m->pAsyncEventQ, E_FAIL); 1955 1956 if (m->pAsyncEventQ->postEvent(event)) 1957 return S_OK; 1958 1959 return E_FAIL; 1943 1944 HRESULT rc; 1945 AutoCaller autoCaller(this); 1946 if (SUCCEEDED((rc = autoCaller.rc()))) 1947 { 1948 if (autoCaller.state() != Ready) 1949 LogWarningFunc(("VirtualBox has been uninitialized (state=%d), the event is discarded!\n", 1950 autoCaller.state())); 1951 // return S_OK 1952 else if ( (m->pAsyncEventQ) 1953 && (m->pAsyncEventQ->postEvent(event)) 1954 ) 1955 return S_OK; 1956 else 1957 rc = E_FAIL; 1958 } 1959 1960 // in any event of failure, we must clean up here, or we'll leak; 1961 // the caller has allocated the object using new() 1962 delete event; 1963 return rc; 1960 1964 } 1961 1965
Note:
See TracChangeset
for help on using the changeset viewer.