Yahoo was in the dumps long before she got in the chair. Marissa Mayer got on after quite a few CEOs quit that same year back to back after a ton of layoffs.
This versus Stephen Flop who got into the chair of a still very profitable company to break it in half and sell it to Microsoft. If Nokia's board would have listened to its workers and market and have done Android phones when they wanted to instead of hiring Flop and have him force the company down a dark path, Nokia would be giving Samsung a run for its money today with a forked Android no less. They had both the resources and opportunity.