When a character has a conversation which makes perfect sense in the context of the fiction, but could also be read as self-aware commentary on the movie or show itself, this is called leaning on the fourth wall.
|2013||Jack the Giant Slayer|
|2012||21 Jump Street|
|2010||The Twilight Saga: Eclipse|
|2001||Jay and Silent Bob Strike Back|
|1986||Ferris Bueller's Day Off|
|1955||The Seven Year Itch|
|1940||His Girl Friday|