This fixes the issue where the users was not able to choose if the objects was selected when un-hidden.
Main issue here is that object_hide_view_set_exec shouldn't be touched at all. All the logic should happen in the unhide operator.
Also, in T45230 it was requested to do that on all unhide operators, not only for objects, but we can add that after you got it working with objects. Just to make you aware of it.
Although this shouldn't be needed at all (see my main concern raised), just a general note on this:
Again, would be fixed by addressing main concern, so JFYI: This doesn't work if unselected is true, objects are always revealed without being selected then.
This shouldn't be done here, it should be done in the unhide operator instead. Setting an option for an operation that wasn't executed yet doesn't fit into Blender UX design.
That's not really what I requested, the flag shouldn't be needed at all. Read my comments carefully.
If you need more help, poke me on IRC (but give me a bit more time than 3 minutes until you head off again ;) )
Also, latest patch is patched incorrectly, it only shows changes to latest patch.