File tree Expand file tree Collapse file tree 1 file changed +26
-18
lines changed Expand file tree Collapse file tree 1 file changed +26
-18
lines changed Original file line number Diff line number Diff line change @@ -354,30 +354,38 @@ cls.ResourceContext = function(data)
354354 res . frameID = event . frameID ;
355355 this . resourcesDict [ res . id ] = res ;
356356 }
357- else if ( ! res )
358- {
359- // ignoring. Never saw an urlload, or it's allready invalidated
360- return ;
361- }
362-
363- res . update ( eventname , event ) ;
364357
365- if ( res . invalid )
366- {
367- delete this . resourcesDict [ res . id ] ;
368- }
369- else if ( eventname == "urlfinished" )
358+ if ( res )
370359 {
371- // push the resourceID into the proper group
372- var frame = this . frames [ res . frameID ] ;
373- var type = res . type ;
374- if ( ! frame . groups [ type ] ) { type = 'other' ; }
360+ res . update ( eventname , event ) ;
375361
376- frame . groups [ type ] . push ( res . id ) ;
377- this . resourcesUrlDict [ res . url ] = res . id ;
362+ if ( eventname == "urlfinished" )
363+ {
364+ // push the resourceID into the proper group
365+ var frame = this . frames [ res . frameID ] ;
366+ if ( frame )
367+ {
368+ var type = res . type ;
369+ if ( ! frame . groups [ type ] ) { type = 'other' ; }
370+
371+ frame . groups [ type ] . push ( res . id ) ;
372+ this . resourcesUrlDict [ res . url ] = res . id ;
373+ }
374+ else
375+ {
376+ res . invalid = true ;
377+ }
378+ }
379+
380+ if ( res . invalid )
381+ {
382+ delete this . resourcesDict [ res . id ] ;
383+ return ;
384+ }
378385
379386 return res ;
380387 }
388+
381389 }
382390
383391 this . get_resource = function ( id )
You can’t perform that action at this time.
0 commit comments