Closed Bug 1415343 Opened 7 years ago Closed 7 years ago

FxAccountsWebChannel.jsm checks for possibly never available 'window' variable

Categories

(Firefox :: Firefox Accounts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

I picked this up whilst starting to looking into better linting of jsms in bug 1369722.

http://searchfox.org/mozilla-central/rev/ed212c79cfe86357e9a5740082b9364e7f6e526f/services/fxaccounts/FxAccountsWebChannel.jsm#512-513

```
// If running in context of the browser chrome, window does not exist.
var targetWindow = typeof window === "undefined" ? null : window;
```

As far as I can see in the Firefox code, that would never be loaded in a non-chrome context. Is there somewhere outside of mozilla-central that it would be used, or can this line be dropped now?
Flags: needinfo?(markh)
I expect that's copy/pasta from about:accounts, so is safe to remove. Thanks!
Flags: needinfo?(markh)
Assignee: nobody → standard8
Comment on attachment 8926769 [details]
Bug 1415343 - Remove useless check for target window from FxAccountsWebChannel.jsm.

https://reviewboard.mozilla.org/r/198006/#review203296
Attachment #8926769 - Flags: review?(markh) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b7bf7d827279
Remove useless check for target window from FxAccountsWebChannel.jsm. r=markh
https://hg.mozilla.org/mozilla-central/rev/b7bf7d827279
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Core → Firefox
Target Milestone: mozilla58 → Firefox 58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: