@@ -1228,6 +1228,15 @@ function logloads(loads) {
12281228 // snapshot(linkSet.loader);
12291229 }
12301230
1231+ function doLink ( linkSet ) {
1232+ try {
1233+ link ( linkSet ) ;
1234+ }
1235+ catch ( exc ) {
1236+ return linkSetFailed ( linkSet , exc ) ;
1237+ }
1238+ }
1239+
12311240 // 15.2.5.2.3
12321241 function updateLinkSetOnLoad ( linkSet , load ) {
12331242 console . assert ( load . status == 'loaded' || load . status == 'linked' , 'loaded or linked' ) ;
@@ -1263,12 +1272,7 @@ function logloads(loads) {
12631272 }
12641273 /***/
12651274
1266- try {
1267- link ( linkSet ) ;
1268- }
1269- catch ( exc ) {
1270- return linkSetFailed ( linkSet , exc ) ;
1271- }
1275+ doLink ( linkSet ) ;
12721276
12731277 console . assert ( linkSet . loads . length == 0 , 'loads cleared' ) ;
12741278
@@ -1801,20 +1805,20 @@ function logloads(loads) {
18011805 hash : m [ 8 ] || ''
18021806 } : null ) ;
18031807 }
1808+ function removeDotSegments ( input ) {
1809+ var output = [ ] ;
1810+ input . replace ( / ^ ( \. \. ? ( \/ | $ ) ) + / , '' )
1811+ . replace ( / \/ ( \. ( \/ | $ ) ) + / g, '/' )
1812+ . replace ( / \/ \. \. $ / , '/../' )
1813+ . replace ( / \/ ? [ ^ \/ ] * / g, function ( p ) {
1814+ if ( p === '/..' )
1815+ output . pop ( ) ;
1816+ else
1817+ output . push ( p ) ;
1818+ } ) ;
1819+ return output . join ( '' ) . replace ( / ^ \/ / , input . charAt ( 0 ) === '/' ? '/' : '' ) ;
1820+ }
18041821 function toAbsoluteURL ( base , href ) {
1805- function removeDotSegments ( input ) {
1806- var output = [ ] ;
1807- input . replace ( / ^ ( \. \. ? ( \/ | $ ) ) + / , '' )
1808- . replace ( / \/ ( \. ( \/ | $ ) ) + / g, '/' )
1809- . replace ( / \/ \. \. $ / , '/../' )
1810- . replace ( / \/ ? [ ^ \/ ] * / g, function ( p ) {
1811- if ( p === '/..' )
1812- output . pop ( ) ;
1813- else
1814- output . push ( p ) ;
1815- } ) ;
1816- return output . join ( '' ) . replace ( / ^ \/ / , input . charAt ( 0 ) === '/' ? '/' : '' ) ;
1817- }
18181822
18191823 href = parseURI ( href || '' ) ;
18201824 base = parseURI ( base || '' ) ;
0 commit comments