Closed
Bug 1146270
Opened 10 years ago
Closed 10 years ago
Move HCI Event Origin into NfcOptions.webidl
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(firefox40 fixed)
RESOLVED
FIXED
2.2 S10 (17apr)
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: allstars.chh, Assigned: allstars.chh)
References
Details
(Whiteboard: [p=2])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
dimi
:
review+
smaug
:
review+
|
Details | Diff | Splinter Review |
Move the definition of the origins of HCI Transaction Event into NfcOptions.webidl.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8582293 -
Flags: review?(dlee)
Comment 2•10 years ago
|
||
Comment on attachment 8582293 [details] [diff] [review]
Patch.
Review of attachment 8582293 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/nfc/gonk/NfcService.cpp
@@ +185,5 @@
>
> // HCI Event Transaction parameters.
> if (mEvent.mOriginType != -1) {
> + HCIEventOrigin origin = static_cast<HCIEventOrigin>(mEvent.mOriginType);
> + MOZ_ASSERT(origin < HCIEventOrigin::EndGuard_);
I found when i build a release build, following error message occurs:
error: unused variable 'origin'
Attachment #8582293 -
Flags: review?(dlee)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8582293 -
Attachment is obsolete: true
Attachment #8582950 -
Flags: review?(dlee)
Updated•10 years ago
|
Attachment #8582950 -
Flags: review?(dlee) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8582950 [details] [diff] [review]
Patch v2.
r? to smaug for the WebIDL change in NfcOptions.webidl
Attachment #8582950 -
Flags: review?(bugs)
Comment 5•10 years ago
|
||
Comment on attachment 8582950 [details] [diff] [review]
Patch v2.
So why not change NfcEventOptions's origin to be type HCIEventOrigin?
Comment 6•10 years ago
|
||
Comment on attachment 8582950 [details] [diff] [review]
Patch v2.
If that is not possible for some reason, please re-ask review for this.
Attachment #8582950 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #5)
> Comment on attachment 8582950 [details] [diff] [review]
> Patch v2.
>
> So why not change NfcEventOptions's origin to be type HCIEventOrigin?
Hi Smaug
Sorry for my late reply.
The 'origin' in NfcEventOptions will have the index for the type of HCIEventOrigin,
for example it will be "SIM1", "SIM2".
Gecko will receive the type of the origin (for example, 0 for "SIM", 1 for "eSE"), and the index number (1, 2, ... etc) from NFC daemon, and I took advantage of the binding code to use the enumeration for "SIM", "eSE" and "ASSD".
Thanks
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8582950 -
Flags: review- → review?(bugs)
Comment 9•10 years ago
|
||
Still don't understand.
You do event.mOrigin.Value().AssignASCII(HCIEventOriginValues::strings[mEvent.mOriginType].value);
where event is NfcEventOptions.
So you always assign a value which is from HCIEventOrigin.
Why not just assign the enum value?
Updated•10 years ago
|
Flags: needinfo?(allstars.chh)
Attachment #8582950 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 10•10 years ago
|
||
Hi Smaug
(In reply to Olli Pettay [:smaug] (review queue is getting too long. New requests after Easter, please) from comment #9)
> Still don't understand.
> You do
> event.mOrigin.Value().AssignASCII(HCIEventOriginValues::strings[mEvent.
> mOriginType].value);
Then the next line is to add the index of the origin.
event.mOrigin.Value().AppendInt(mEvent.mOriginIndex, 16 /* radix */);
> where event is NfcEventOptions.
event.mOrigin is type of DOMString, it could be "SIM1", "SIM2", ... depend on the implementation.
But the HCIEventOrigin is just "SIM", "eSE", .. etc, without the index.
Flags: needinfo?(allstars.chh)
Comment 11•10 years ago
|
||
Comment on attachment 8582950 [details] [diff] [review]
Patch v2.
oh, I see. Origin get rather odd value.
but doesn't change the current behavior, so fine.
Attachment #8582950 -
Flags: review- → review+
Assignee | ||
Comment 12•10 years ago
|
||
Whiteboard: [p=2]
Target Milestone: --- → 2.2 S10 (17apr)
Comment 13•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•