Changeset 42123 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 12, 2012 10:10:36 AM (13 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r42022 r42123 13187 13187 * 13188 13188 * @note Locks this object for writing. 13189 * @note This method must not call saveSettings or SaveSettings, otherwise 13190 * it can cause crashes in random places due to unexpectedly committing 13191 * the current settings. The caller is responsible for that. The call 13192 * to saveStateSettings is fine, because this method does not commit. 13189 13193 */ 13190 13194 HRESULT SessionMachine::setMachineState(MachineState_T aMachineState) … … 13385 13389 mData->mCurrentStateModified = TRUE; 13386 13390 stsFlags |= SaveSTS_CurStateModified; 13387 SaveSettings(); // @todo r=dj why the public method? why first SaveSettings and then saveStateSettings?13388 13391 } 13389 13392 } -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r42110 r42123 1905 1905 stateRestored = true; 1906 1906 1907 /* Paranoia: no one must have saved the settings in the mean time. If 1908 * it happens nevertheless we'll close our eyes and continue below. */ 1909 Assert(mMediaData.isBackedUp()); 1910 1907 1911 /* assign the timestamp from the snapshot */ 1908 Assert(RTTimeSpecGetMilli 1912 Assert(RTTimeSpecGetMilli(&snapshotTimeStamp) != 0); 1909 1913 mData->mLastStateChange = snapshotTimeStamp; 1910 1914 … … 1932 1936 // remove from machine data 1933 1937 mMediaData->mAttachments.remove(pAttach); 1934 // remove it from the backup or else saveSettings will try to detach 1935 // it again and assert 1936 mMediaData.backedUpData()->mAttachments.remove(pAttach); 1938 // Remove it from the backup or else saveSettings will try to detach 1939 // it again and assert. The paranoia check avoids crashes (see 1940 // assert above) if this code is buggy and saves settings in the 1941 // wrong place. 1942 if (mMediaData.isBackedUp()) 1943 mMediaData.backedUpData()->mAttachments.remove(pAttach); 1937 1944 // then clean up backrefs 1938 1945 pMedium->removeBackReference(mData->mUuid);
Note:
See TracChangeset
for help on using the changeset viewer.