Closed Bug 1415343 Opened 3 years ago Closed 3 years ago
Accounts Web Channel .jsm checks for possibly never available 'window' variable
59 bytes, text/x-review-board-request
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?
I expect that's copy/pasta from about:accounts, so is safe to remove. Thanks!
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 email@example.com: https://hg.mozilla.org/integration/autoland/rev/b7bf7d827279 Remove useless check for target window from FxAccountsWebChannel.jsm. r=markh
You need to log in before you can comment on or make changes to this bug.