convert from Javascript Promises to goog.Promise