Closed Bug 1509029 Opened 6 years ago Closed 2 years ago

[meta] browser-*.js global-scope pollution

Categories

(Firefox :: General, task, P5)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: dao, Assigned: dao)

References

Details

(Keywords: meta)

browser-*.js scripts are often seen as self-contained when they're really not (they share the browser window scope with loads of other scripts), leading people to think it would be reasonable to put their helper stuff in their "private" scope just like they would in a jsm. Then somebody else sees that the thing they want to use is already defined and reuse it in some other script running in the browser window, leading to weird dependencies that are annoying when refactoring or moving code, or they don't see it and redeclare it (possibly with some other value when things are named too generically). Filing this meta bug for this reoccurring code hygiene issue as a way to provide context so that I won't have to repeatedly explain it.
Depends on: 1509323
User Story: (updated)
See Also: → 1509309
Depends on: 1509451
User Story: (updated)
Depends on: 836448
Assignee: nobody → dao+bmo
Component: General → JavaScript Engine
Product: Firefox → Core

Sylvestre, is the bot moving all "JavaScript" bugs into the JS Engine component? That seems wrong.

Flags: needinfo?(sledru)

Pretty sure the problem here was the mention of JavaScript and global and scope, which are often linked to JavaScript bugs.
Also, comment 0 is empty and the info is in the user story (which is pretty rare).

Flags: needinfo?(sledru)
Type: enhancement → task
Component: JavaScript Engine → General
Product: Core → Firefox
User Story: (updated)
Depends on: 1588813
Depends on: 1589018
Depends on: 1589328
Depends on: 1589340

This come up during General triage, all bugs tracked are marked as closed and so we are closing the meta, feel to reopen if there is still work ongoing.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.