Promise API implementation for GWT