Yuuuup. If someone higher up than me in the work hierarchy yells at me, that's it. I'm out. Life is too short for that. Those people are toxic and I do not want to work with people like that, let alone be "managed" by people like that.
No, on the couple occasions it's happened I just told the boss immediately that I quit, I gathered up my stuff, and left. In both occasions it was witnessed by coworkers so they knew what happened.