VirtualBox

Changeset 52682 in vbox


Ignore:
Timestamp:
Sep 10, 2014 4:43:11 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96009
Message:

Main/Machine+Settings: Changing extradata for a Machine instance is special, there is no "old" state available for comparing, and thus it must force saving. The settings change optimizes out the useless effort to do a deep comparison of two maps.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r52497 r52682  
    49164916
    49174917        bool fNeedsGlobalSaveSettings = false;
    4918         i_saveSettings(&fNeedsGlobalSaveSettings);
     4918        // This saving of settings is tricky: there is no "old state" for the
     4919        // extradata items at all (unlike all other settings), so the old/new
     4920        // settings comparison would give a wrong result!
     4921        i_saveSettings(&fNeedsGlobalSaveSettings, SaveS_Force);
    49194922
    49204923        if (fNeedsGlobalSaveSettings)
  • trunk/src/VBox/Main/xml/Settings.cpp

    r52312 r52682  
    22152215                 && (storageMachine             == c.storageMachine)        // this one's deep
    22162216                 && (mediaRegistry              == c.mediaRegistry)         // this one's deep
    2217                  && (mapExtraDataItems          == c.mapExtraDataItems)     // this one's deep
     2217                 // skip mapExtraDataItems! there is no old state available as it's always forced
    22182218                 && (llFirstSnapshot            == c.llFirstSnapshot)       // this one's deep
    22192219               )
Note: See TracChangeset for help on using the changeset viewer.

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