I don't quite get what you want to do here.
Why not just call terminateCurrentTab() ?