File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -396,7 +396,11 @@ cls.ResourceContext = function(data)
396396 if ( eventname == "urlload" )
397397 {
398398 if ( res . id == frame . resourceID )
399+ {
399400 frame . resource = res ;
401+ if ( frame . parentFrameID )
402+ frame . sameOrigin = cls . ResourceUtil . sameOrigin ( this . frames [ frame . parentFrameID ] . resource , frame . resource ) ;
403+ }
400404 }
401405
402406 if ( eventname == "urlfinished" )
@@ -411,7 +415,6 @@ cls.ResourceContext = function(data)
411415 this . resourcesUrlDict [ res . url ] = res . id ;
412416
413417 // sameOrigin check
414- // TODO: sameOrigin check for iframes
415418 res . sameOrigin = cls . ResourceUtil . sameOrigin ( frame . resource , res ) ;
416419 }
417420 else
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ templates.resource_tree =
2525 var frame = context . frames [ frameID ] ;
2626 if ( frame . parentFrameID != parentFrameID ) { continue ; }
2727
28- var r = context . get_resource ( frame . resourceID ) ;
28+ r = frame . resource ;
2929 if ( ! r )
3030 continue ;
31-
31+
3232 var className = '-expand-collapse' ;
3333 var tmp =
3434 {
@@ -45,6 +45,7 @@ templates.resource_tree =
4545 'span' ,
4646 ( r . filename || r . human_url ) ,
4747 [ ] ,
48+ 'style' , '' + ( frame . sameOrigin !== false ?'' :'color:red;' ) ,
4849 'data-tooltip' , ( r && 'js-script-select' ) ,
4950 'data-tooltip-text' , ( r && 'frame: ' + r . human_url )
5051 ] ,
@@ -139,7 +140,7 @@ templates.resource_tree =
139140 'span' ,
140141 ( r . filename || r . human_url ) ,
141142 [ ] ,
142- 'style' , ( r . sameOrigin ?'' :'color:red' ) ,
143+ 'style' , ( r . sameOrigin !== false ?'' :'color:red' ) ,
143144 'data-tooltip' , ( r && 'js-script-select' ) ,
144145 'data-tooltip-text' , ( r && groupName + ': ' + r . human_url )
145146 ] ,
You can’t perform that action at this time.
0 commit comments