The XXX should really say that it should be broken out into it's own small method and called from within the charmbrowser if block a few lines down.