title: dart:js error when calling promiseToFuture - NoSuchMethodError: tried to call a non-function, such as null: 'jsPromise.then'
body: <p>I'm trying to await a custom global JavaScript function:</p>
  <pre><code>  var promise = js.context.callMethod('performAuthenticationInNewWindow', [uri.toString()]);
    print(promise);
    var qs = await promiseToFuture(promise);
  </code></pre>
  <p>Which prints the following:</p>
  <pre><code>[object Promise]
  NoSuchMethodError: tried to call a non-function, such as null: 'jsPromise.then'
  </code></pre>