Drop the indentation-preserving block from Tabbrowser.sys.mjs
Categories
(Firefox :: Tabbed Browser, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox156 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Tabbrowser.sys.mjs wraps almost its whole body in a bare block:
let Tabbrowser;
{
...
} // end of the indentation-preserving block
export { Tabbrowser };
A module's top level is private already, so the block provides no scope. It exists only to hold the indentation the file had as a window script, which is what let bug 2049770 land the move as a detectable rename with blame intact. Now that the move has landed, the level of nesting is pure cost: lines wrap two columns earlier than they need to.
Removing it is not a whitespace-only change. Two fewer spaces let prettier re-join lines that now fit in 80 columns: 52 hunks survive git diff -w, collapsing 169 lines into 60, and git blame -w cannot see through those. The remaining ~9000 lines are pure re-indentation and blame follows them.
The commit's SHA goes into .git-blame-ignore-revs and .hg-annotate-ignore-revs afterwards, since a commit can't carry its own SHA -- the same treatment bug 1128203's "Reduce indentation from 4 to 2 spaces" got.
With the block gone, let Tabbrowser; + Tabbrowser = class {...}; + export { Tabbrowser }; collapses into export class Tabbrowser {...}, and the module-private consts and TabProgressListener become plain module-scope declarations.
| Assignee | ||
Comment 1•6 days ago
|
||
Not whitespace-only: two fewer columns let prettier re-join lines that now fit
in 80 columns. git diff -w isolates those as 49 hunks collapsing 180 lines
into 62; the rest is re-indentation that git blame -w follows.
The SHA goes into .git-blame-ignore-revs and .hg-annotate-ignore-revs in a
follow-up, since a commit can't carry its own SHA.
Updated•6 days ago
|
| Assignee | ||
Updated•6 days ago
|
Comment 3•4 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 4•4 days ago
|
||
| Assignee | ||
Updated•4 days ago
|
Comment 6•1 day ago
|
||
| bugherder | ||
Description
•