src/debug/window_manager.js
function pollForParentOpen() {
  /* jshint validthis:true */
  if (this.pollNum > 0) {
    if (this.opener && !this.opener.OLD_TUNGSTEN_MASTER && typeof this.opener.attachTungstenDebugPane === 'function') {
      this.opener.attachTungstenDebugPane(this);
    } else {
      this.pollNum -= 1;
      this.loadingCounter.textContent = '' + this.pollNum;
      this.setTimeout(pollForParentOpen, POLL_INTERVAL);
    }
  } else {
    this.window.close();
  }
}
function pollForParentOpen() {
  /* jshint validthis:true */
  if (this.pollNum > 0) {
    if (this.opener && !this.opener.OLD_TUNGSTEN_MASTER && typeof this.opener.attachTungstenDebugPane === 'function') {
      this.opener.attachTungstenDebugPane(this);
    } else {
      this.pollNum -= 1;
      this.loadingCounter.textContent = '' + this.pollNum;
      this.setTimeout(pollForParentOpen, POLL_INTERVAL);
    }
  } else {
    this.window.close();
  }
}
function pollForParentOpen ( ) { /* jshint validthis:true */ if ( this . pollNum > 0 ) { if ( this . opener && ! this . opener . OLD_TUNGSTEN_MASTER && typeof this . opener . attachTungstenDebugPane === 'function' ) { this . opener . attachTungstenDebugPane ( this ) ; } else { this . pollNum -= 1 ; this . loadingCounter . textContent = '' + this . pollNum ; this . setTimeout ( pollForParentOpen , POLL_INTERVAL ) ; } } else { this . window . close ( ) ; } }
When the parent window unloads, the debug window polls to reattach
Will auto-close if the parent window hasn't reappeared after 30s
When the parent window unloads the debug window polls to reattach Will auto - close if the parent window hasn t reappeared after 30s