How do other people handle this situation:

Question: You are in a dungeon and someone starts hounding you about how you are playing your job, not in a constructive way. Also, what do you do as a spectator to the person getting hounded?

Example: I was in a dungeon today and a Ninja was constantly telling the black mage he was playing his job wrong. Being an experienced black mage, I knew what the black mage was doing, and while it wasn't perfect, it wasn't really slowing us down. But every pull, the ninja complained and complained about the black mage. I felt so bad for him. It was awkward for the rest of us. The black mage stayed quiet and pressed on but I just wanted to scream "DONT TELL PEOPLE WHAT TO DO!" It was annoying me so bad! So, how do other people handle this?