Closed Bug 1142552 Opened 5 years ago Closed 5 years ago

Remove remaining expression closures from browser-ctrlTab.js

Categories

(Firefox :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 39
Tracking Status
firefox39 --- fixed

People

(Reporter: dao, Assigned: abdelrahman, Mentored)

References

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1121471 +++

Expression closures (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Expression_closures) are a nonstandard language extension we'd like to remove from SpiderMonkey.

For browser-ctrlTab.js, bug 1121471 already took care of the ctrlTab object's selected, isOpen, tabCount and tabPreviewCount getters. However, the allTab object's toolbarButton and canOpen getters still use expression closures:

http://hg.mozilla.org/mozilla-central/annotate/0190a1d17294/browser/base/content/browser-ctrlTab.js#l574

The general pattern for getters is that:

get x() y,

needs to be replaced with:

get x() {
  return y;
},
Assignee: nobody → a.ahmed1026
Status: NEW → ASSIGNED
Attachment #8576988 - Flags: review?(dao)
Comment on attachment 8576988 [details] [diff] [review]
rev 1 - Remove expression closures from browser-ctrlTab.js

Looks good!
Attachment #8576988 - Flags: review?(dao) → review+
https://hg.mozilla.org/mozilla-central/rev/01316c76a81f
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.