Closed Bug 1122709 Opened 10 years ago Closed 10 years ago

Remove use of expression closures from browserPlacesViews.js

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 38

People

(Reporter: dao, Assigned: reyes.christopher, Mentored)

References

Details

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

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1122433 +++ 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. In browser/components/places/content/browserPlacesViews.js, this affects the following getters: get viewElt() this._viewElt, get associatedElement() this._viewElt, get controllers() this._viewElt.controllers, get place() this._place, get result() this._result, get options() this._options, get controller() this._controller, get selType() "single", get hasSelection() this.selectedNode != null, get draggableSelection() [this._draggedElt], get ownerWindow() window, The general pattern for getters is that: get x() y, needs to be replaced with: get x() { return y; },
Attached patch browserPlacesViews.js (obsolete) (deleted) — Splinter Review
Hi, I have created a patch which I believe addresses the issue.
Attachment #8550664 - Flags: review?(dao)
Comment on attachment 8550664 [details] [diff] [review] browserPlacesViews.js Hi! This is not a patch, it's the entire modified file. Please use hg diff.
Attachment #8550664 - Flags: review?(dao)
Attached patch name.patch1 (obsolete) (deleted) — Splinter Review
Thanks, I have tried again. Please see the attachment.
Attachment #8550664 - Attachment is obsolete: true
Attachment #8550706 - Flags: review?(dao)
Comment on attachment 8550706 [details] [diff] [review] name.patch1 Yep, this is better. Please add a semicolon after each return statement, then this is good to go.
Attachment #8550706 - Flags: review?(dao) → review+
Assignee: nobody → reyes.christopher
Attached patch name.patch1 (deleted) — Splinter Review
Thanks, I have added in the semicolons.
Attachment #8550706 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: