jorendorff / js-loaders

Pseudoimplementation of the proposed ES6 module loaders.
54 stars 7 forks source link

proceedToFetch before addLoadToLinkSet #88

Closed guybedford closed 10 years ago

guybedford commented 10 years ago

I've just switched to trying Chrome's native promises with the polyfill and am getting a different callback ordering. This is affecting ProcessLoadDependencies at the following section:

The issue is that proceedToFetch is running 1.1.1.11 CallFetch before the load record is added to the linkset. This then invokes the failure check if load.linkSets.length == 0 return since it thinks there was a load failure.

The fix is to change this failure check to if load.status == 'failed' instead.

This may be Chrome's promise implementation acting up. But it may be worth noting.

guybedford commented 10 years ago

Moved to https://bugs.ecmascript.org/show_bug.cgi?id=2602