Closed
Bug 1344798
Opened 7 years ago
Closed 7 years ago
Improvements to mscom::AsyncInvoker
Categories
(Core :: IPC, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
People
(Reporter: bugzilla, Assigned: bugzilla)
References
Details
Attachments
(1 file)
8.23 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
When implementing an async call using mscom::AsyncInvoker, it became clear that some improvements needed to be made to the interface. In particular, it could be possible in a11y to have a pointer to an interface that may or may not be a proxy. That would force us to do something like this: IFoo* myInterface = ...; if (IsProxy(myInterface)) { ASYNC_INVOKER_FOR(IFoo) invoker(myInterface); hr = invoker.Begin_Bar(param1, param2); } else { hr = myInterface->Bar(param1, param2); } Which is messy and hard to maintain. Instead I'm moving that into the AsyncInvoker itself, so that it may just do the right thing depending on whether or not it has an async interface. Now we can do this: ASYNC_INVOKER_FOR(IFoo) invoker(myInterface); hr = ASYNC_INVOKE(myInterface, Bar, param1, param2); and it just works. It's type-safe too!
Assignee | ||
Comment 1•7 years ago
|
||
Whoops, that last sample line of code should be: hr = ASYNC_INVOKE(invoker, Bar, param1, param2);
Assignee | ||
Comment 2•7 years ago
|
||
Attachment #8844077 -
Flags: review?(jmathies)
Updated•7 years ago
|
Attachment #8844077 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 3•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/04b7515972841369d3efc5abc275cdf30b5da143 Bug 1344798: Allow mscom::AsyncInvoker to be able to handle proxied and non-proxied interfaces; r=jimm
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/04b751597284
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•