Since this is the only use of *WindowManager*, assigning *WindowManager* to a local variable is also premature generalization that we should generally avoid, since it makes the code more complicated to read and understand, and it doesn't reduce programming error.

We're better off waiting until we actually need to use a value twice before we factor it out into a local variable, even if it makes a subsequent change larger (because it contains the refactoring). Since we might never need to use the variable twice, and that way we only pay the cost of refactoring the variable when it becomes necessary. So this should be simply:

```
    let origin = shell.contentBrowser.contentWindow.wrappedJSObject.
                 WindowManager.getCurrentDisplayedApp().origin;
```