File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -753,7 +753,7 @@ class Benchmark {
753753 this . isAsync = ! ! plan . isAsync ;
754754 this . allowUtf16 = ! ! plan . allowUtf16 ;
755755 this . scripts = null ;
756- this . preloads = null ;
756+ this . preloads = [ ] ;
757757 this . shellPrefetchedResources = null ;
758758 this . results = [ ] ;
759759 this . _state = BenchmarkState . READY ;
@@ -1073,7 +1073,6 @@ class Benchmark {
10731073 } ) ) ;
10741074
10751075 if ( this . plan . preload ) {
1076- this . preloads = [ ] ;
10771076 for ( const [ name , resource ] of Object . entries ( this . plan . preload ) ) {
10781077 promises . push ( this . loadBlob ( "preload" , name , resource ) . then ( ( blobData ) => {
10791078 if ( ! globalThis . allIsGood )
@@ -1156,8 +1155,7 @@ class Benchmark {
11561155 console . assert ( this . scripts === null , "This initialization should be called only once." ) ;
11571156 this . scripts = this . plan . files . map ( file => shellFileLoader . load ( file ) ) ;
11581157
1159- console . assert ( this . preloads === null , "This initialization should be called only once." ) ;
1160- this . preloads = [ ] ;
1158+ console . assert ( this . preloads . length === 0 , "This initialization should be called only once." ) ;
11611159 this . shellPrefetchedResources = Object . create ( null ) ;
11621160 if ( ! this . plan . preload ) {
11631161 return ;
You can’t perform that action at this time.
0 commit comments