sync with rogerwang node-webkit [master]