Hm, I'm a bit confused about this change. A couple of questions:

Why is the new code manually running the "then" call in a separate task? Isn't that asynchronicity encapsulated in the .then method itself already? At least I don't see this extra step in the spec. AFAICS, it would be sufficient to simply
do

    } else if (IsPromise(result)) {
      var chain = PromiseChain;
      if (thenable) {
        chain = result.then;
        if (!IS_SPEC_FUNCTION(then)) {
          deferred.resolve(result);
          return;
        }
      }
      %_CallFunction(result, deferred.resolve, deferred.reject, chain);
    }

Why would that not work?

And if you actually do need the duplicated logic, why don't you need to go
through PromiseEnqueue? It seems like you're bypassing all the debugger hooks in
that case. Is that intentional?


https://codereview.chromium.org/1098663002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to