Chris Brown has turned the tables on the woman who was arrested for trespassing at his house -- because now he won't stop threatening her on social media ... according to her, anyway.
Danielle Patti filed for a temporary restraining order against Chris, claiming he's repeatedly harassed her on his social media platforms and said he'd like to see her dead. She also says they used to date.
Patti is the same woman who ... as we reported, was arrested in December when she allegedly drove onto Chris' property and refused to leave.
In the docs, filed by Patti herself, she tells it differently ... claiming she was trying to leave, but couldn't because someone parked a car in front of hers. She says Chris called the cops and she was arrested. She claims she was cleared of all charges.
The judge granted the restraining order -- meaning Chris must stay 100 yards away from Patti and have no contact with her -- pending a hearing later this month. We're guessing he'll be cool with that.