Closed Bug 1122433 Opened 10 years ago Closed 10 years ago

Remove use of expression closures from AboutHome.jsm

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 38

People

(Reporter: dao, Assigned: shreyaslakhe, Mentored)

References

Details

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

Attachments

(2 files, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1122356 +++ 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 AboutHome.jsm, this only affects the snippetsVersion getter as far as I can see: http://hg.mozilla.org/mozilla-central/annotate/cac6192956ab/browser/modules/AboutHome.jsm#l30 The general pattern for getters is that: get x() y, needs to be replaced with: get x() { return y; },
Hi again, Can i work on this bug? Thanks.
(In reply to Vikram Jadhav from comment #1) > Hi again, > Can i work on this bug? > Thanks. Since you're already fixing a very similar bug, I'd suggest trying something different now, like bug 1122430.
Hey I am new to bugzilla Can you help me to start off?
(In reply to Vaibhav Bhosale from comment #3) > Hey > I am new to bugzilla > Can you help me to start off? Hi. Have you read https://developer.mozilla.org/en-US/docs/Introduction?
Hi, Can I work on this?
(In reply to 0o3ko0 from comment #5) > Hi, > Can I work on this? Feel free to, as long as this bug isn't assigned and nobody has attached a patch.
Attached patch part 1Splinter Review
Attachment #8550850 - Flags: review?(dao)
Comment on attachment 8550850 [details] [diff] [review] part 1 Looks about right, but indentation is off (and should use spaces only, no tabs) and there should be a semicolon after the return statement...
Attachment #8550850 - Flags: review?(dao)
Attached patch ref1-Replaces expression closure (obsolete) — Splinter Review
Attachment #8550862 - Flags: review?(dao)
Comment on attachment 8550862 [details] [diff] [review] ref1-Replaces expression closure > this.AboutHomeUtils = { > get snippetsVersion() { >- return STARTPAGE_VERSION >+ return STARTPAGE_VERSION; > }, The line with the return statement should be indented with 4 spaces and } with 2 spaces. Also, please make sure your diff is against the repository head rather than on top of your previous patch.
Attachment #8550862 - Flags: review?(dao)
Attachment #8550904 - Flags: review?(dao)
Comment on attachment 8550904 [details] [diff] [review] bug1122433_expression_closurefixes2.diff Something went wrong here... this file is basically empty, there's no patch
Attachment #8550904 - Flags: review?(dao)
The same copy of the diff file is getting generated every time I run the diff.
I suspect you've committed your changes and diff only cares about uncommitted changes. What do you get when running hg out?
comparing with https://hg.mozilla.org/mozilla-central/ searching for changes changeset: 224093:22dd808317ca user: shreyas <shreyas@gmail.com> date: Sun Jan 18 11:23:06 2015 +0530 summary: [mq]: shreyas.patch changeset: 224094:3e0de4967e79 user: shreyas <shreyas@gmail.com> date: Sun Jan 18 11:23:45 2015 +0530 summary: [mq]: 1122433.patch changeset: 224095:aeab5d86be38 tag: qparent user: shreyas <shreyas@gmail.com> date: Sun Jan 18 12:36:59 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm changeset: 224096:eeb897ff519b tag: bug1122433_expression_closurefixes.diff tag: qbase user: shreyas <shreyas@gmail.com> date: Sun Jan 18 15:04:49 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm changeset: 224436:3a61f863d15e tag: bug1122433_expression_closurefixes1.diff parent: 224096:eeb897ff519b user: shreyas <shreyas@gmail.com> date: Sun Jan 18 21:36:03 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm changeset: 224437:7a5852c22869 tag: bug1122433_expression_closurefixes2.diff user: shreyas <shreyas@gmail.com> date: Sun Jan 18 21:39:24 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm changeset: 224438:0d117974a674 tag: bug1122433_expression_closurefixes3.diff user: shreyas <shreyas@gmail.com> date: Sun Jan 18 21:46:21 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm changeset: 224439:9d5b3039a9ab tag: bug1122433_expression_closurefixes4.diff tag: qtip tag: tip user: shreyas <shreyas@gmail.com> date: Sun Jan 18 21:58:08 2015 +0530 summary: Bug 1122433 - Expression closure replaced in Abouthome.jsm
Attachment #8551268 - Flags: review?(dao)
Comment on attachment 8551268 [details] [diff] [review] part 2 (addressed review comments) This is still on top of attachment 8550850 [details] [diff] [review]. I'll combine these two patches and get this landed :)
Attachment #8551268 - Attachment description: bug1122433_expression_closurefixes7.diff → part 2 (addressed review comments)
Attachment #8551268 - Flags: review?(dao) → review+
Attachment #8550850 - Attachment description: ref1-Replaces expression closure → part 1
Attachment #8550850 - Flags: review+
Attachment #8550862 - Attachment is obsolete: true
Attachment #8550904 - Attachment is obsolete: true
Assignee: nobody → shreyaslakhe
Component: Shell Integration → General
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

Creator:
Created:
Updated:
Size: