Life is rosy, the dog hasn't bitten you yet. But, he shows no signs of needing to go off to his corner for a sip of water and an inspirational chat with his trainer. Look around for a possible escape route.
Once you've identified one, try to maneuver around so that the dog is tugging you toward it, rather than you trying to drag the dog in that direction. Use the force of his tug to your advantage, but still put up some resistance.
"Escape" is whatever is closest that will provide an immediate, solid barrier between you and the dog. If you are in a park, look for a restroom building, maintenance shed, or tennis court. On a residential street, your only recourse may be to duck behind some stranger's side gate (they'll understand).
Bear in mind two things with this: First, the gate may be locked. Don't concede the tug-of-war prize until you have the gate open and are mostly inside, ready to slam it in the dog's face. Second, there may well be another dog on the other side of that gate! All you can do is hope for the best and be prepared.
Here Comes the Owner
If the dog's owner should arrive on the scene, do not breathe a sigh of relief that the cavalry has shown up. In fact, if you have and guard left to put up, do so.
Aggressive dogs can become even more so in the presence of their owners. They now have something specific to protect. The person who dumps kibble in his bowl every day is now within striking distance of an evil intruder. This triggers his instinct to preserve the food source. Also, the dog may become emboldened by the arrival of "pack member" back-up.
Do not listen to the owner. They will make all kinds of ridiculous statements that are only to be ignored. "Oh, he wouldn't really bite you," "Just let him smell your hand," "He's just playing," "He'll listen to me if you just let go". In the course of my job, I've had occasion to roll an incredulous eye toward the source of all of the above claims.
You are in danger. Social graces are the least of your concerns. Don't worry about offending the owner by refusing to believe that Fluffy the Doberman is really just a big, playful sweetie. Don't feel like you're being an over-reacting silly goose in light of their reassuring convictions regarding their family pet's true nature. Many dog owners are incapable of seeing their dog for what he truly is - an animal. Nature, red in tooth and claw.
Your objective is to get out of there bite-free. Do not be distracted from it.