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

RESOLVED FIXED in Firefox 58

Status

()

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

Trunk
Firefox 58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
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

Updated

2 years ago
Assignee: nobody → standard8

Comment 3

2 years ago
mozreview-review
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+

Comment 4

2 years ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b7bf7d827279
Remove useless check for target window from FxAccountsWebChannel.jsm. r=markh

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b7bf7d827279
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58

Updated

2 years ago
Product: Core → Firefox
Target Milestone: mozilla58 → Firefox 58
You need to log in before you can comment on or make changes to this bug.