That hasn’t fazed Exxon Mobil. On the contrary, as social attitudes and other corporations’ policies on the subject of gay rights have changed drastically, Exxon Mobil has moved steadily further from the mainstream, even within the energy sector. According to the Human Rights Campaign, 88 percent of Fortune 500 companies have adopted written nondiscrimination policies prohibiting harassment and discrimination on the basis of sexual orientation, as have all the major integrated oil companies that compete with Exxon Mobil.

Twenty-one states, the District of Columbia and more than 160 cities and counties have laws prohibiting employment discrimination based on sexual orientation. But Exxon Mobil maintains it isn’t bound by these because of the federal Defense of Marriage Act, which pre-empts state law. A constitutional challenge to DOMA is awaiting a decision by the Supreme Court, and two federal appeals courts have ruled DOMA unconstitutional.

“Exxon Mobil is an outlier among Fortune 500 companies on this issue,” Mr. DiNapoli said when I asked him about it this week. He said it was not only a social or civil rights issue. “The company runs the risk of restricting its ability to attract and maintain top talent. Exxon Mobil is sending a message that applicants and employees can be discriminated against on the basis of non-job related criteria. It just doesn’t make sense from a bottom-line standpoint.”

In countries where it’s mandated by law, Exxon Mobil does have policies barring discrimination against gay and lesbian employees — and extends spousal benefits to same-sex married couples. But the company has gone to unusual lengths to avoid doing so in the United States. Mobil Oil had polices protecting gay and lesbian employees from discrimination, and extended benefits to same-sex couples. But Exxon rescinded them when it acquired Mobil in 1999. It eliminated the same protections and benefits when it acquired XTO Energy in 2009.

A former Exxon Mobil employee told me that he was involved with the company’s effort to transfer a highly valued executive from Belgium, where the executive lived with his husband, to Texas. He said the executive told the company, “I’m not coming alone,” and asked for the same medical benefits and recognition for his spouse that he received in Belgium. The company refused.