code: function updateLinkSetOnLoad(linkSet, load) {
        console.assert(load.status == 'loaded' || load.status == 'linked', 'loaded or linked');
  
        // console.log('update linkset on load ' + load.name);
        // snapshot(linkSet.loader);
  
        linkSet.loadingCount--;
  
        if (linkSet.loadingCount > 0)
          return;
  
        var startingLoad = linkSet.loads[0];
        try {
          link(linkSet);
        }
        catch(exc) {
          return linkSetFailed(linkSet, exc);
        }
  
        console.assert(linkSet.loads.length == 0, 'loads cleared');
  
        linkSet.resolve(startingLoad);
      }
docs: 15.2.5.2.3