Merge pull request #765 from ochameau/bug/833783

Fix Bug 833783: Fix leaks in tabs and windows when closing a top-level chrome window. r=@erikvold(cherry picked from commit b06eb5ba5d95fa7c2ccfb916ed7a4bc388579a9a)