Closed
Bug 930855
Opened 11 years ago
Closed 11 years ago
Replace WidgetEvent::Is*DerivedClass() with As*Event()
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
4.18 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #822124 -
Flags: review?(bugs)
Comment 2•11 years ago
|
||
Comment on attachment 822124 [details] [diff] [review]
Patch
I don't understand. Why replace non-virtual method with a virtual one?
Attachment #822124 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 3•11 years ago
|
||
Comment on attachment 822124 [details] [diff] [review]
Patch
(In reply to Olli Pettay [:smaug] from comment #2)
> Comment on attachment 822124 [details] [diff] [review]
> Patch
>
> I don't understand. Why replace non-virtual method with a virtual one?
The reason is that the methods are non-virtual but they call virtual methods (As*Event()) internally. So, I believe that it doesn't make sense we keep having duplicated methods for different return type.
Attachment #822124 -
Flags: review- → review?(bugs)
Comment 4•11 years ago
|
||
Comment on attachment 822124 [details] [diff] [review]
Patch
Ah, indeed.
(Though, I guess at some point we'll want IsFooEvent() methods which aren't virtual)
Attachment #822124 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #4)
> (Though, I guess at some point we'll want IsFooEvent() methods which aren't
> virtual)
As you said, if IsFooEvent() should return true even if an instance inherits the class, I don't think we need them because they're just wrappers of AsFooEvent() != nullptr, isn't it?
I was suggested that we should implement AsFooEvent() as non-virtual method, but the suggested patch was more complicated than current code. Therefore, it was not granted. See bug 920425 comment 14.
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•11 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•