Closed
Bug 1235830
Opened 8 years ago
Closed 8 years ago
Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: aidin, Assigned: aidin)
Details
Attachments
(1 file)
As Olli Pettay suggested in Bug 1230216 Comment 9
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → aidin
Assignee | ||
Comment 1•8 years ago
|
||
"WidgetEvent" is also the name of a type, so I can't use it as the name of a method. Should I change the name to "GetWidgetEvent"?
Flags: needinfo?(bugs)
Comment 2•8 years ago
|
||
Oh, right. GetWidgetEvent() hints that it may return null, but it should never return null, so something else. Perhaps AsWidgetEvent() ? Not quite happy with that but nothing better comes to my mind now.
Flags: needinfo?(bugs)
Comment 3•8 years ago
|
||
I'm also using Get*() when * is a type/class name even if it never returns nullptr. Should we discuss this issue in dev-platform?
Comment 4•8 years ago
|
||
Perhaps, though I guess it has been mostly a dom/* convention that Foo* GetFoo() may return null and Foo* AsFoo() or Foo* SomeOtherGetterListMethod() doesn't return null.
Assignee | ||
Comment 5•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/34567/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/34567/
Attachment #8718421 -
Flags: review?(bugs)
Assignee | ||
Comment 6•8 years ago
|
||
I asked on dev-platform, and Bobby Holley suggest the name WidgetEventRef. I think that's fine. Here's the try server build without error: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4124741e66f4
Why would we name it WidgetEventRef if it doesn't actually return a reference?
Comment 8•8 years ago
|
||
Yeah, WidgetEventRef isn't right here. WidgetEventPtr() would be ok, or make the method to return WidgetEvent& and then use WidgetEventRef.
Comment 9•8 years ago
|
||
If WidgetEventPtr in .idl is causing trouble here, feel free to change that name.
Updated•8 years ago
|
Attachment #8718421 -
Flags: review?(bugs)
Assignee | ||
Updated•8 years ago
|
Attachment #8718421 -
Flags: review?(bugs)
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8718421 [details] MozReview Request: Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/34567/diff/1-2/
Assignee | ||
Comment 11•8 years ago
|
||
Now it's look better (: Here's the try server build: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1983d133e3dd
Updated•8 years ago
|
Attachment #8718421 -
Flags: review?(bugs) → review+
Comment 12•8 years ago
|
||
Comment on attachment 8718421 [details] MozReview Request: Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r?smaug https://reviewboard.mozilla.org/r/34567/#review31435 Ah, WidgetEvent is in mozilla namespace so .idl part should work. Thanks.
Comment 14•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/03fc467e1002
Keywords: checkin-needed
Comment 15•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/03fc467e1002
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•