So how do you recover, as the only obvious way to get the stuff out of the dock is one item at a time? There's a quick two-step solution. First, delete com.apple.dock.plist from your ~/Library/Preferences folder. Second, use ProcessViewer (or the Terminal) to quit the dock. When it restarts, you'll find a new dock with the default OS X icon set installed.
If you had a highly customized set of things in your dock that you'd rather not have lost, you're out of luck at this point (short of hand-editing the dock.plist file). In the future, though, create a backup of the dock.plist file while the dock is "good", and then just replace the "bad" dock.plist file with your good backup and restart the dock -- you'll have your pre-incident dock back complete with customization.
The publication of this hint is in no way an admittance that I may have actually done something like this, of course ;-).

