Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: src/native_client/src/trusted/handle_pass/browser_handle.cc

Issue 3076010: IMC: Remove ReturnCreatedDesc() method from effector object (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/native_client/src/trusted/handle_pass/browser_handle.cc
diff --git a/src/native_client/src/trusted/handle_pass/browser_handle.cc b/src/native_client/src/trusted/handle_pass/browser_handle.cc
index 3b30b84a63998d527775be511ff1c701c140653f..e6b06dad8e851d793cd0bfdbb9bfdadf677a080e 100644
--- a/src/native_client/src/trusted/handle_pass/browser_handle.cc
+++ b/src/native_client/src/trusted/handle_pass/browser_handle.cc
@@ -103,34 +103,17 @@ static NaClSrpcError Shutdown(NaClSrpcChannel* channel,
}
static void WINAPI HandleServer(void* dummy) {
- // Set up an effector.
- struct NaClNrdXferEffector effector;
- struct NaClDescEffector* effp;
struct NaClDesc* lookup_desc;
struct NaClSrpcHandlerDesc handlers[] = {
{ "lookup:ii:i", Lookup },
{ "shutdown::", Shutdown },
{ (char const *) NULL, (NaClSrpcMethod) 0, },};
- // Create an effector to use to receive the connected socket.
- if (!NaClNrdXferEffectorCtor(&effector)) {
- goto no_state;
- }
- effp = (struct NaClDescEffector*) &effector;
// Accept on the bound socket.
- if (0 != (handle_descs[0]->vtbl->AcceptConn)(handle_descs[0], effp)) {
- goto effector_constructed;
+ if (0 == (handle_descs[0]->vtbl->AcceptConn)(handle_descs[0], &lookup_desc)) {
+ // Create an SRPC client and start the message loop.
+ NaClSrpcServerLoop(lookup_desc, handlers, NULL);
}
- // Get the connected socket from the effector.
- lookup_desc = NaClNrdXferEffectorTakeDesc(&effector);
- // Create an SRPC client and start the message loop.
- NaClSrpcServerLoop(lookup_desc, handlers, NULL);
- // Success. Clean up.
-
- effector_constructed:
- effp->vtbl->Dtor(effp);
- no_state:
- NaClThreadExit();
}
struct NaClDesc* NaClHandlePassBrowserGetSocketAddress() {

Powered by Google App Engine
This is Rietveld 408576698