code: function(init) {
    var fulfillCallbacks = new Backlog();
    var rejectCallbacks = new Backlog();
    var value;
    var error;
    var state = "pending";
  
    if (underTest) {
      Object.defineProperties(this, {
        _value: _readOnlyProperty(function() { return value; }),
        _error: _readOnlyProperty(function() { return error; }),
        _state: _readOnlyProperty(function() { return state; }),
      });
    }
  
    Object.defineProperties(this, {
      _addAcceptCallback: _pseudoPrivate(
        function(cb) {
          // console.log("adding fulfill callback:", cb);
          fulfillCallbacks.push(cb);
          if (state == "fulfilled") {
            fulfillCallbacks.pump(value);
          }
        }
      ),
      _addRejectCallback: _pseudoPrivate(
        function(cb) {
          // console.log("adding reject callback:", cb);
          rejectCallbacks.push(cb);
          if (state == "rejected") {
            rejectCallbacks.pump(error);
          }
        }
      ),
    });
    var r = new Resolver(this,
                         fulfillCallbacks, rejectCallbacks,
                         function(v) { value = v; },
                         function(e) { error = e; },
                         function(s) { state = s; })
    try {
      if (init) { init(r); }
    } catch(e) {
      r.reject(e);
    }
  }
docs: Promise Constuctor