There are a lot of ways Google can play ball: change the TOS of GMail to exclude certain plug-ins, change the ad div's signature, randomly generate different ad's display logic, digitally sign the GMail's content/code to prevent alternation, have their own plug-in to verify the content, bring out the big gun lawyers.