Closed
Bug 1112552
Opened 11 years ago
Closed 10 years ago
Clean up global-scope pollution from browser-fxaccounts.js
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 37
People
(Reporter: dao, Assigned: abdelrahman, Mentored)
References
Details
(Whiteboard: [good first bug][lang=js])
Attachments
(1 file, 1 obsolete file)
|
8.75 KB,
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
browser/base/content/browser-fxaccounts.js shares the global browser window scope with many other scripts and shouldn't set random variables there.
Therefore, we should:
* change 'XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {' to 'XPCOMUtils.defineLazyGetter(gFxAccounts, "FxAccountsCommon", function () {'
* adjust code accessing the FxAccountsCommon variable to access this.FxAccountsCommon instead
* change 'XPCOMUtils.defineLazyModuleGetter(this, "fxaMigrator",' to 'XPCOMUtils.defineLazyModuleGetter(gFxAccounts, "fxaMigrator",'
* adjust code accessing the fxaMigrator variable to access this.fxaMigrator instead
* move PREF_SYNC_START_DOORHANGER, DOORHANGER_ACTIVATE_DELAY_MS and SYNC_MIGRATION_NOTIFICATION_TITLE into the gFxAccounts object
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8537976 -
Flags: review?(dao)
| Reporter | ||
Comment 2•11 years ago
|
||
Comment on attachment 8537976 [details] [diff] [review]
rev 1 - Clean up browser-fxaccounts.js
Looks good, thanks!
Attachment #8537976 -
Flags: review?(dao) → review+
| Reporter | ||
Updated•11 years ago
|
Assignee: nobody → codo.abdo
| Reporter | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Something in this push caused mass bustage. Backed out.
https://hg.mozilla.org/integration/fx-team/rev/803bc910c45a
| Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-5] from comment #4)
> Something in this push caused mass bustage. Backed out.
> https://hg.mozilla.org/integration/fx-team/rev/803bc910c45a
Looks like this was caused by XPCOMUtils.defineLazyGetter(gFxAccounts... / XPCOMUtils.defineLazyModuleGetter(gFxAccounts... being called before the gFxAccounts object would be declared.
Abdelrhman, can you update the patch to fix that?
Flags: needinfo?(codo.abdo)
| Assignee | ||
Comment 6•11 years ago
|
||
Flags: needinfo?(codo.abdo)
Attachment #8539288 -
Flags: review?(dao)
| Reporter | ||
Updated•11 years ago
|
Attachment #8539288 -
Flags: review?(dao) → review+
| Reporter | ||
Updated•11 years ago
|
Attachment #8537976 -
Attachment is obsolete: true
| Reporter | ||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
backed out for bc1 test bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=1515169&repo=fx-team
Comment 9•10 years ago
|
||
Can we please verify that this is green on Try before burning the trees for a third time?
| Reporter | ||
Comment 10•10 years ago
|
||
| Reporter | ||
Comment 11•10 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #10)
> https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=57294ae763e1
Oops, this wasn't actually running the primarily interesting test suite, i.e. browser-chrome.
Comment 12•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
You need to log in
before you can comment on or make changes to this bug.
Description
•