Glock sells a special striker, or something, specifically to allow underwater use; apparently, Glocks have something of a reputation as a shark gun for divers. G&A magazine did an underwater test of a 1911, 20-25 years ago.
Firing a gun underwater is one of the stupidest things you can do. If you're not wearing substantial hearing AND eye protection, you stand to permanently damage both abilities, (As a few people who've tried this have already done!) and come flying out of the water screaming in agony! The underwater shock waves can, even, permanently damage your internal organs, too!
Yes, Glock offers, 'marine spring cups' specifically for shooting a 9mm G-17 in or around an, 'aquatic environment' - NOT underwater! (One of the world's truly great stupid ideas!) In order to fire a pistol, any pistol, underwater you need: a free traveling firing pin, (In a Glock this means marine spring cups) reduced power round nose ammo, and you need to make sure that the barrel is full of water before firing.
What took place in that G&A, 'test' is pure insanity! Any of those pistols might have ruptured a barrel due to the increased firing pressure of: full power ammuntion, or JHP's increased resistance to water. Furthermore if you take the time to read the, 'test', the author admits that the Glocks were already defective in some respect; and, he decided to use them, anyway, during this, 'test'.
Use a pistol for shark protection? Why? The bullets aren't going to go more than 12 to 15 feet; and, they aren't going to be hitting all that hard, either. Firing a gun underwater is a great idea only if you're suicidal, tired of hearing and seeing or really like pain; and, you can forget about sharks!