code: function linkSetFailed(linkSet, exc) {
        var loader = linkSet.loader;
        var loads = linkSet.loads.concat([]);
        for (var i = 0, l = loads.length; i < l; i++) {
          var load = loads[i];
  
          // store all failed load records
          loader.loaderObj.failed = loader.loaderObj.failed || [];
          if (indexOf.call(loader.loaderObj.failed, load) == -1)
            loader.loaderObj.failed.push(load);
  
          var linkIndex = indexOf.call(load.linkSets, linkSet);
          console.assert(linkIndex != -1, 'link not present');
          load.linkSets.splice(linkIndex, 1);
          if (load.linkSets.length == 0) {
            var globalLoadsIndex = indexOf.call(linkSet.loader.loads, load);
            if (globalLoadsIndex != -1)
              linkSet.loader.loads.splice(globalLoadsIndex, 1);
          }
        }
        linkSet.reject(exc);
      }
docs: 15.2.5.2.4