@@ -105,18 +105,21 @@ cls.ResourceInspector = function(network_logger)
105105
106106 ctx . document_resource_hash = { } ;
107107
108- // mapping of the WindowIDs in the debugging context
109- var window_id_index = { } ;
110- ctx . window_list . forEach ( function ( w , i ) { window_id_index [ w . id ] = i ; } ) ;
111-
112- var null_document_id = false ;
113- var document_id_index = { } ;
114108 var lead = function ( str , char , len )
115109 {
116110 str = String ( str ) ;
117111 return new Array ( ( len || 8 ) - str . length + 1 ) . join ( char || "-" ) + str ;
118112 } ;
119113
114+ // mapping of the WindowIDs in the debugging context + pivot_id
115+ var window_id_index = { } ;
116+ ctx . window_list . forEach ( function ( w , i ) {
117+ w . pivot_id = lead ( w . id ) ;
118+ window_id_index [ w . id ] = i ;
119+ } ) ;
120+
121+ var null_document_id = false ;
122+ var document_id_index = { } ;
120123 // filter the documents that belong in the window_id list,
121124 // set null_document_id flag,
122125 // augment the document objects,
@@ -136,7 +139,9 @@ cls.ResourceInspector = function(network_logger)
136139 document_id_index [ d . documentID ] = i ;
137140
138141 // set depth, pivot_id and same_origin
139- var p = a [ document_id_index [ d . parentDocumentID ] ] || { pivot_id : lead ( d . windowID ) , depth : 0 } ; ;
142+ var p = a [ document_id_index [ d . parentDocumentID ] ] ;
143+ if ( ! p )
144+ p = { pivot_id : ctx . window_list [ window_id_index [ d . windowID ] ] . pivot_id , depth : 0 } ;
140145 var id = p . pivot_id + lead ( d . documentID ) ;
141146 d . depth = p . depth + 1 ;
142147 d . pivot_id = id ;
@@ -246,7 +251,7 @@ cls.ResourceInspector = function(network_logger)
246251 if ( event . shiftKey )
247252 {
248253 pivot_ids . push . apply ( pivot_ids , Object . keys ( hash ) . filter ( function ( p ) {
249- return p . startswith ( pivot_id + "_" ) ;
254+ return p . startswith ( pivot_id ) ;
250255 } ) ) ;
251256 }
252257
0 commit comments