I wonder if we should not have all of this in ActivityHandler.resetActivity(). Maybe in https://bugzilla.mozilla.org/show_bug.cgi?id=936729 ?