A majority of the Supreme Court upheld admission of the gun, extending the search incident to arrest exception to cases in which the arrested person was a "recent occupant" of the vehicle. "So long as an arrestee is the sort of 'recent occupant' of a vehicle such as petitioner was here, officers may search that vehicle incident to the arrest."
The court did not say just how recently a "recent occupant" must have been inside the vehicle to invoke this exception. It seems likely that substantial intervening time or distance would tend to make the Thornton rule inapplicable. For example, if the suspect parks the vehicle and goes inside a residence or business where he is lawfully pursued and arrested, it would be prudent to obtain consent or identify some other exception before returning to search the parked vehicle.
The Thornton decision is also noteworthy for two other facets of its holding. Note that before the search, Thornton was already handcuffed and secured in the police car, and yet the court had no hesitation in upholding the search. (Some lower courts had ruled that once a suspect is cuffed and caged where he cannot gain access to weapons or contraband in his own vehicle, this exception does not apply.) According to the Supreme Court's decision, officers are not forced to choose between safety precautions and search authority. The arrestee can be secured, and a prompt search incident to arrest can then be conducted.
Also important in the Thornton opinion is the reaffirmation of the rule that it is the existence of probable cause to arrest, and not actually making a formal arrest, that justifies an incidental search. The court said, "Once an officer determines that there is probable cause to make an arrest, it is reasonable to allow officers to ensure their safety and to preserve evidence by searching the entire passenger compartment." At your option, therefore, you may arrest and secure the suspect first, or make the search first (assuming probable cause to arrest). If the search produces additional grounds for arrest, these may also be used. (But note that in Knowles v. Iowa the Supreme Court ruled that there can be no search incident to a detention and release on citation.)
The good news from Thornton is that a suspect who is able to pull over, lock his car, and try to walk away before you're in position to make a vehicle stop cannot defeat a valid search of his vehicle incident to arrest, where you have probable cause to arrest him and are able to contact him while he is still a "recent occupant" of the vehicle.