Closed
Bug 1173802
Opened 11 years ago
Closed 10 years ago
Improve NFC I/O code
Categories
(Firefox OS Graveyard :: NFC, defect)
Tracking
(firefox42 fixed)
RESOLVED
FIXED
FxOS-S4 (07Aug)
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: tzimmermann, Assigned: tzimmermann)
References
Details
Attachments
(5 files, 5 obsolete files)
|
12.35 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
15.98 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
8.98 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
6.69 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
|
1.34 KB,
patch
|
tzimmermann
:
review+
|
Details | Diff | Splinter Review |
NFC messages are send and received on the I/O thread, processed on the NFC thread, and the actual DOM code runs on the main thread. Messages passing between these threads are often send via the main thread, even though main only forwards to the next thread.
The NFC I/O code can be made cleaner and faster by exchanging messages directly between NFC thread and I/O thread, and removing the extra hop through main.
See also a similar improvement for RIL in bug 1171994
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8621479 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8621480 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8621482 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8621484 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8621485 -
Flags: review?(allstars.chh)
| Assignee | ||
Comment 6•11 years ago
|
||
Hi Yoshi,
I know you have a tight schedule, but the patch set isn't urgent. Take your time with the review.
Thanks, I'll be quite busy recently,
so I expect to review these after work week. i.e. in July.
Comment on attachment 8621479 [details] [diff] [review]
[01] Bug 1173802: Move NFC socket and messaging code into |NfcConsumer|
Review of attachment 8621479 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/nfc/gonk/NfcService.cpp
@@ +16,4 @@
> #include "mozilla/ipc/NfcConnector.h"
> +#include "mozilla/ipc/StreamSocket.h"
> +#include "mozilla/ipc/StreamSocketConsumer.h"
> +#include "mozilla/ModuleUtils.h"
Are you trying yo sort this alphabetically ?
If yes then this should be moved to after mozilla/ClearOnShutdown.h
@@ +20,3 @@
> #include "mozilla/unused.h"
> +#include "NfcMessageHandler.h"
> +#include "NfcOptions.h"
ditto
@@ +434,5 @@
> + MOZ_ASSERT(NS_IsMainThread());
> +
> + switch (aIndex) {
> + case LISTEN_SOCKET: {
> + nsCString value("nfcd:-a ");
indent, should be 2 spaces.
Attachment #8621479 -
Flags: review?(allstars.chh) → review+
Attachment #8621480 -
Flags: review?(allstars.chh) → review+
Attachment #8621482 -
Flags: review?(allstars.chh) → review+
Attachment #8621484 -
Flags: review?(allstars.chh) → review+
Attachment #8621485 -
Flags: review?(allstars.chh) → review+
| Assignee | ||
Comment 9•10 years ago
|
||
> > #include "mozilla/ipc/NfcConnector.h"
> > +#include "mozilla/ipc/StreamSocket.h"
> > +#include "mozilla/ipc/StreamSocketConsumer.h"
> > +#include "mozilla/ModuleUtils.h"
>
> Are you trying yo sort this alphabetically ?
> If yes then this should be moved to after mozilla/ClearOnShutdown.h
It comes after mozilla/ClearOnShutdown. (?)
>
> @@ +434,5 @@
> > + MOZ_ASSERT(NS_IsMainThread());
> > +
> > + switch (aIndex) {
> > + case LISTEN_SOCKET: {
> > + nsCString value("nfcd:-a ");
>
> indent, should be 2 spaces.
OK.
Comment on attachment 8621479 [details] [diff] [review]
[01] Bug 1173802: Move NFC socket and messaging code into |NfcConsumer|
Review of attachment 8621479 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/nfc/gonk/NfcService.cpp
@@ +16,4 @@
> #include "mozilla/ipc/NfcConnector.h"
> +#include "mozilla/ipc/StreamSocket.h"
> +#include "mozilla/ipc/StreamSocketConsumer.h"
> +#include "mozilla/ModuleUtils.h"
Sorry I mean
#include "mozilla/ModuleUtils.h" should be moved to line 11.
| Assignee | ||
Comment 11•10 years ago
|
||
I still don't get it. 'd' and 'i' come before 'm'. AFAICT the coding style doesn't require treating directories differently.
| Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #11)
> I still don't get it. 'd' and 'i' come before 'm'. AFAICT the coding style
> doesn't require treating directories differently.
okay then fine by me
I thought we sort it by ascii code.
| Assignee | ||
Comment 14•10 years ago
|
||
Changes since v1:
- rebased onto m-c
- fixed coding style according to review
Attachment #8621479 -
Attachment is obsolete: true
Attachment #8641553 -
Flags: review+
| Assignee | ||
Comment 15•10 years ago
|
||
Changes since v1:
- rebased onto m-c
Attachment #8621480 -
Attachment is obsolete: true
Attachment #8641554 -
Flags: review+
| Assignee | ||
Comment 16•10 years ago
|
||
Changes since v1:
- rebased onto m-c
Attachment #8621482 -
Attachment is obsolete: true
Attachment #8641555 -
Flags: review+
| Assignee | ||
Comment 17•10 years ago
|
||
Changes since v1:
- rebased onto m-c
Attachment #8621484 -
Attachment is obsolete: true
Attachment #8641556 -
Flags: review+
| Assignee | ||
Comment 18•10 years ago
|
||
Changes since v1:
- rebased onto m-c
Attachment #8621485 -
Attachment is obsolete: true
Attachment #8641557 -
Flags: review+
Comment 19•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/d59e98209a18
https://hg.mozilla.org/integration/b2g-inbound/rev/d732c4e52cf4
https://hg.mozilla.org/integration/b2g-inbound/rev/5c029f9eaf54
https://hg.mozilla.org/integration/b2g-inbound/rev/3037c7071f0b
https://hg.mozilla.org/integration/b2g-inbound/rev/c93b6381b8cd
| Assignee | ||
Comment 20•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d59e98209a18
https://hg.mozilla.org/mozilla-central/rev/d732c4e52cf4
https://hg.mozilla.org/mozilla-central/rev/5c029f9eaf54
https://hg.mozilla.org/mozilla-central/rev/3037c7071f0b
https://hg.mozilla.org/mozilla-central/rev/c93b6381b8cd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S4 (07Aug)
You need to log in
before you can comment on or make changes to this bug.
Description
•