code: function notify(listener) {
      var func = state == webdriver.promise.Deferred.State_.RESOLVED ?
          listener.callback : listener.errback;
      if (func) {
        flow.runInNewFrame_(goog.partial(func, value),
            listener.fulfill, listener.reject);
      } else if (state == webdriver.promise.Deferred.State_.REJECTED) {
        listener.reject(value);
      } else {
        listener.fulfill(value);
      }
    }
docs: Notifies a single listener of this Deferred's change in state.
  @param {!webdriver.promise.Deferred.Listener_} listener The listener to
  notify.