mirror of
https://github.com/ariya/phantomjs.git
synced 2024-09-11 04:46:09 +03:00
Fix potential hang in the example scripts due to missing exit() call.
Patch by Jônatas Pedraza <jonatas.nona@gmail.com> and Vivek Galatage <vivekgalatage@gmail.com>. http://code.google.com/p/phantomjs/issues/detail?id=922
This commit is contained in:
parent
15fe514025
commit
9c0888d54d
@ -28,6 +28,7 @@ else
|
||||
page.open address, (status) ->
|
||||
if status isnt 'success'
|
||||
console.log 'FAIL to load the address'
|
||||
phantom.exit()
|
||||
else
|
||||
window.setTimeout ->
|
||||
sniffed = page.evaluate(->
|
||||
|
@ -41,6 +41,7 @@ if (system.args.length === 1) {
|
||||
page.open(address, function (status) {
|
||||
if (status !== 'success') {
|
||||
console.log('FAIL to load the address');
|
||||
phantom.exit();
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
sniffed = page.evaluate(function () {
|
||||
|
@ -21,6 +21,7 @@ if (system.args.length < 3 || system.args.length > 5) {
|
||||
page.open(address, function (status) {
|
||||
if (status !== 'success') {
|
||||
console.log('Unable to load the address!');
|
||||
phantom.exit();
|
||||
} else {
|
||||
window.setTimeout(function () {
|
||||
page.render(output);
|
||||
|
Loading…
Reference in New Issue
Block a user