Parser::getFreshParser sometimes returns $this. This is a relic of previous code which had a global $wgParser which it kept alive forever and tried to reuse. We should let the $parser go out of scope and get gc'ed and just create a new one if/when needed, instead of playing games and trying to reuse parser state.
|Open||None||T261329 Prepare Parsoid for MW 1.37 (ideally)|
|Open||None||T236809 Refactor Parser.php to allow alternate parser (Parsoid)|
|Open||None||T250750 Parser::getFreshParser should always return a fresh parser|