Green’s Dictionary of Slang

dolly n.3

[f. a variety of jokes in which a supposedly innocent girl plays with a man’s ‘dolly’, which then spits at her, vomits etc.; e.g. cits. 1938, 1972]

1. the penis.

[UK]Farmer & Henley Sl. and Its Analogues II 305/2: Dolly subs. [...] 3. (venery), — The penis.
[UK]School Life in Paris 32: His ‘dolly’ [was] in a violent state of erection.
[UK]A. Cairene Sixfold Sensuality 21: She at once jumped on top of him and guided his dolly into her milk-can [Ibid.] 74: The Abbé [...] would not withdraw his dolly until it was sick and vomited in Ella’s brown sugar basin.
[US] joke cited in G. Legman Rationale of the Dirty Joke (1972) I 102: I played with your dolly all night. It’s funny though. When I touched it, it sat up, then it stood up, then it threw up, then it fainted.
[US]B. Rodgers Queens’ Vernacular 49: the penis [...] dolly (fr the old joke where a father tells his inquisitive daughter that his penis is a doll. One day he awakes from a nap and sees his daughter crying. When asked what hapened, she replies that she was playing with the dolly [...] until it squirted her in the eye!

2. (N.Z. prison) a prison-made knife.

[NZ]D. Looser Boobslang [U. Canterbury D.Phil. thesis] 59/1: dolly n. 4 a knife, a shank.