Closed
Bug 750301
Opened 13 years ago
Closed 13 years ago
add static asserts internal and xpcom accessible roles are the same
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: tbsaunde, Assigned: maxli)
Details
(Whiteboard: [good first bug][mentor=trev.saunders@gmail.com][lang=c++])
Attachments
(1 file)
|
1.62 KB,
patch
|
tbsaunde
:
review+
surkov
:
feedback+
|
Details | Diff | Splinter Review |
add new file accessible/src/base/RoleAsserts.cpp in it define ROLE() macro as MOZ_STATIC_ASSERT(roles::geckoRole == nsIAccessibleRole::ROLE_ ## geckRole, "internal and xpcom roles differ!");
then include RoleMap.h
| Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → maxli
Attachment #621233 -
Flags: review?(trev.saunders)
| Reporter | ||
Updated•13 years ago
|
Attachment #621233 -
Flags: review?(trev.saunders)
Attachment #621233 -
Flags: review+
Attachment #621233 -
Flags: feedback?(surkov.alexander)
Comment 2•13 years ago
|
||
maybe we could introduce general propose Debug.cpp instead? (in case if you don't want to use any existing file). You might want add other assertions there (in case if we do similar things for states for example).
| Reporter | ||
Comment 3•13 years ago
|
||
(In reply to alexander :surkov from comment #2)
> maybe we could introduce general propose Debug.cpp instead? (in case if you
> don't want to use any existing file). You might want add other assertions
> there (in case if we do similar things for states for example).
I don't feel very strongly either way, on one hand this way we may end up with lots of files, on the other if this file stops compiling you might have a more imediate idea what's wrong.
Comment 4•13 years ago
|
||
I'm just a little bit septic to have couple lines long files. But I'm not sure I like to keep this code under nsAccessibilityService.cpp for example (but why not after all?) so we could introduce generic propose file for stuffs like this. In either case I think I would want to end up with bunch of short files like RoleAssertion.cpp StateAssertion.cpp, RelationAssertion.cpp (etc).
| Reporter | ||
Comment 5•13 years ago
|
||
(In reply to alexander :surkov from comment #4)
> I'm just a little bit septic to have couple lines long files. But I'm not
> sure I like to keep this code under nsAccessibilityService.cpp for example
> (but why not after all?) so we could introduce generic propose file for
> stuffs like this. In either case I think I would want to end up with bunch
> of short files like RoleAssertion.cpp StateAssertion.cpp,
> RelationAssertion.cpp (etc).
ok, I'm sort of tempted to see what the next use will be so we can understand what grouping actually makes sense instead of what we think will make sense in the future, but sure I'd probably add file Asserts.cpp or BuildAsserts.cpp but it doesn't matter much to me.
Comment 6•13 years ago
|
||
Comment on attachment 621233 [details] [diff] [review]
Patch v1
Review of attachment 621233 [details] [diff] [review]:
-----------------------------------------------------------------
f=me per comment #5
Attachment #621233 -
Flags: feedback?(surkov.alexander) → feedback+
Comment 7•13 years ago
|
||
Target Milestone: --- → mozilla15
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•