Remove remaining expression closures from browser-ctrlTab.js

RESOLVED FIXED in Firefox 39

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dao, Assigned: abdelrhman, Mentored)

Tracking

Trunk
Firefox 39
Points:
---

Firefox Tracking Flags

(firefox39 fixed)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
+++ 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)

Comment 1

4 years ago
Created attachment 8576988 [details] [diff] [review]
rev 1 - Remove expression closures from browser-ctrlTab.js
Assignee: nobody → a.ahmed1026
Status: NEW → ASSIGNED
Attachment #8576988 - Flags: review?(dao)
(Reporter)

Comment 2

4 years ago
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
Last Resolved: 4 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.