Yahoo CEO Marissa Mayer may have had a good idea back in 2014. But now it may turn out to be a very bad one.
In 2014, Mayer signed a deal with Mozilla to make Yahoo (YHOO) the default search engine in Mozilla’s popular Firefox browser. In doing so, Yahoo replaced Google, although Firefox users still had the option to switch to Google by changing the browser’s settings.
For Mayer, the deal was a potentially pivotal one. At the time, Firefox was one of the most popular browsers in the world and accounted for a large chunk of search traffic when she was a Google executive. Yahoo taking over from Google let Mayer get that search traffic and hopefully get more people to use her own service.
Neither Mozilla nor Yahoo, however, have divulged details about their partnership’s success or lack thereof.
But according to tech news site Recode, which obtained a copy of the agreement between Yahoo and Mozilla, there is a clause in the agreement that would allow the browser maker to leave the partnership if Yahoo is acquired. In addition, the new Yahoo owner would need to pay Mozilla $375 million annually through 2019, or about $1 billion, if Yahoo is acquired anytime soon.
Get Data Sheet, Fortune’s technology newsletter
Yahoo is currently reviewing bids for its core business, which includes search. While Yahoo has remained silent about those negotiations, it’s believed that several major companies including Verizon (VZ) submitted offers. Yahoo is expected to start its final bidding round soon and could announce a new owner sometime this summer.
If that happens, Mozilla could then exercise its clause in its Yahoo contract, according to Recode, and collect its $375 million annually. And all Mozilla must do in that scenario is simply say that it doesn’t want to work with Yahoo’s new owner—a quick and easy way to make $1 billion.
That said, Mozilla may not to exercise its clause and therefore remain under contract with any new Yahoo owner. However, sources told Recode that the partnership hasn’t been all that “profitable,” and it might make sense for Mozilla to cut ties with Yahoo, sign a new deal with another company, and keep collecting from Yahoo.
The revelation could have a profound impact on Yahoo and its ultimate selling price. The clause, which Mayer included simply because she didn’t believe Yahoo would actually be sold, according to the report, adds more risk to a Yahoo buyout. It could mean that in addition to the acquisition price a company pays for Yahoo’s core business, which is expected to come in between $5 billion and $8 billion, it would also need to be ready to pay $1 billion over a few years to rid itself of a Mozilla deal.
In an interview with Recode, one person who claims to be in the running to buy Yahoo called the Mozilla payoff “very hairy.” Another buyer told Recode it was “worrisome.”
For more about Yahoo, watch:
For its part, Yahoo has not commented on the clause and did not respond to Fortune‘s request for comment. However, Mozilla chief legal and business officer Denelle Dixon-Thayer hinted that the clause is indeed real, and could be exercised, if need be.
“We are carefully watching this process and we remain closely engaged with Yahoo on this,” Dixon-Thayer said. “Each of our search agreements is the result of a competitive process reflective of the value that Firefox brings to the ecosystem. Naturally, as with any important agreement, it’s critical to consider all foreseeable events to make sure there is protection against downside risk.”