resolve = function(value) {
    'use strict';
    if (!called) {
      called = true;
      onFulfilled.call(context, value);
    }
  }
Attempts to call the `then` method on an object in the hopes that it is
a Promise-compatible instance. This allows interoperation between different
Promise implementations, however a non-compliant object may cause a Promise
to hang indefinitely. If the `then` method throws an exception, the
dependent Promise will be rejected with the thrown value.

@see http://promisesaplus.com/#point-70

@param {Thenable} thenable An object with a `then` method that may be
    compatible with the Promise/A+ specification.
@param {!Function} then The `then` method of the Thenable object.
@param {!Function} onFulfilled
@param {!Function} onRejected
@param {*} context
@private