The criticism against Mayer was due to a combination of her age, gender and "celebrity" status (celebrities tend to be attractive, successful and wealthy). A man would not have had a media circus around him due to the fact that he chose to start a family while being a CEO (a choice that she informed the Yahoo board of before taking the job). Mayer also looks about 10 years younger than she is in most photos; which IMO leads to a lot of armchair executives criticizing her as inexperienced (lol, she was a key member of the team that built the product that destroyed Yahoo, so I'm pretty sure she's experienced).
IMO Mayer is a great example that having kids doesn't have to derail your career as a female executive. While she may set an unrealistic standard for other women (damn Stanford overachievers!) I can't fault her for figuring out a way to make the various elements of her life work for her.