I based this on https://github.com/rossberg-chromium/js-promise/blob/master/promise.js and fixed some obvious bugs. I guess I missed this one.