The default bug view has changed. See this FAQ.

[AccessFu] Abolish anonymous functions

RESOLVED FIXED in mozilla15

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla15
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
{
  foo: function(arg) {}
}

should be
{
  foo: function foo(arg) {}
}
(Assignee)

Comment 1

5 years ago
Created attachment 622917 [details] [diff] [review]
Provide names to all functions that are not in-line. Remove some dumps, wrap some lines.

From now on, introducing anonymous functions is a sin!
Attachment #622917 - Flags: review?(dbolter)
(Assignee)

Updated

5 years ago
Assignee: nobody → eitan
Status: NEW → ASSIGNED
Comment on attachment 622917 [details] [diff] [review]
Provide names to all functions that are not in-line. Remove some dumps, wrap some lines.

Review of attachment 622917 [details] [diff] [review]:
-----------------------------------------------------------------

I wonder if you want to do your mock private-ness via underscore prefixes while you are here? What is the b2g/ff style guide say about that?
What is your rule for naming functions? Is it
objectname_functionname or just functionname? (you have a mix I think)
(Assignee)

Comment 4

5 years ago
(In reply to David Bolter [:davidb] from comment #2)
> Comment on attachment 622917 [details] [diff] [review]
> Provide names to all functions that are not in-line. Remove some dumps, wrap
> some lines.
> 
> Review of attachment 622917 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I wonder if you want to do your mock private-ness via underscore prefixes
> while you are here? What is the b2g/ff style guide say about that?

We should do that for consistency. I'll upload another patch.
(Assignee)

Comment 5

5 years ago
(In reply to David Bolter [:davidb] from comment #3)
> What is your rule for naming functions? Is it
> objectname_functionname or just functionname? (you have a mix I think)

If it is a subclass or an implementation of an interface, I prefix the function name with the object name.
(Assignee)

Comment 6

5 years ago
Created attachment 623253 [details] [diff] [review]
Bug 752127 - Provide names to all functions that are not in-line. Remove some dumps, wrap some lines.

I "privatized" the methods that are internal utility functions. The ones that I didn't touch are ones that I think will be useful API in a future addon, or ones that are required for interfaces (observe, handleEvent).
Attachment #622917 - Attachment is obsolete: true
Attachment #622917 - Flags: review?(dbolter)
Attachment #623253 - Flags: review?(dbolter)

Updated

5 years ago
Attachment #623253 - Flags: review?(dbolter) → review+
(Assignee)

Comment 7

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/5a911d6449b1
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/5a911d6449b1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.