This event occurs at the end of Chapter 17, and is significant because Dorian Gray seems to be safe and in the clear. Even though he has committed murder, he has successfully blackmailed a former friend to dispose of the remains of Basil Hallward and remain quiet about it. Everything seems to suggest that he is a man who has escaped justice. Until this chapter. Quite dramatically, he suddenly faints and falls to the floor. It is only at the end of the chapter that the reader is told what he saw that made him faint in such a dramatic way:
There was a wild recklessness of gaiety in his manner as he sat at table, but now and then a thrill of terror ran through him when he remembered that, pressed against the window of the conservatory like a white handkerchief, he had seen the face of James Vane watching him.
Note the way that the face of James Vane is compared to a "white handkerchief" that is "pressed" against the conservatory window: it is clear that this description augments the horror that Dorian must feel. This is because of Dorian's involvement with James's sister, Sibyl, and her tragic end, and the way that James Vane is now out to get Dorian. Having started this chapter in a position of, so he thought, safety, Dorian now faces the fact that he is now in danger again, and that his many crimes are catching up with him.