Bug 1031988 - Grab the principal from the object rather than the window when resolving the controller shim. r=bz