Bug 866342 - Use try/catch around weakref.get(), r=mdas, a=test-only