ariya/phantomjs — pull request #12432 by milianw (2014-08-06 13:42:13+00:00)
Title: Stop processing of JavaScript after phantom.exit().

This code:

console.log("Hello World!");
phantom.exit();
console.log("Meh, noone should see me!");

currently produces this unexpected output:

Hello World!
Meh, noone should see me!

This patch fixes it to only output the first line, by loading a blank
page on phantom.exit(). Direct deletion of the web page can trigger
crashes, so this is a safe workaround.

https://github.com/ariya/phantomjs/issues/12431