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

Issue 8503006: Fix handling of async IO from pipes on Windows (Closed)

Created:
9 years, 1 month ago by Søren Gjesse
Modified:
9 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix handling of async IO from pipes on Windows The handling of async IO on Windows wrongly casted everything to a socket connection. For named pipe based connections this caused reading of invalid memory. Moved some of the functions to a common superclass and only call showdown for socket connections. For named pipe based connections the Dart part of the code will never send shutdown commands as named pipe based connections start out being closed in one direction and closing the other direction causes a close command. R=ager@google.com BUG=dart:363 TEST= Committed: https://code.google.com/p/dart/source/detail?r=1308

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments from ager@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -88 lines) Patch
M runtime/bin/eventhandler_win.h View 1 7 chunks +25 lines, -25 lines 0 comments Download
M runtime/bin/eventhandler_win.cc View 13 chunks +60 lines, -60 lines 0 comments Download
M runtime/bin/process_test.cc View 2 chunks +4 lines, -1 line 0 comments Download
M tests/standalone/standalone.status View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
9 years, 1 month ago (2011-11-08 09:11:38 UTC) #1
Mads Ager (google)
LGTM! http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h File runtime/bin/eventhandler_win.h (right): http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h#newcode202 runtime/bin/eventhandler_win.h:202: int flags_; Should parts of this be private ...
9 years, 1 month ago (2011-11-08 09:57:08 UTC) #2
Søren Gjesse
9 years, 1 month ago (2011-11-08 12:56:50 UTC) #3
http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h
File runtime/bin/eventhandler_win.h (right):

http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h#...
runtime/bin/eventhandler_win.h:202: int flags_;
On 2011/11/08 09:57:08, Mads Ager wrote:
> Should parts of this be private now? I guess flags could be private and
probably
> the critical section as well?

Done.

http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h#...
runtime/bin/eventhandler_win.h:289: next_(NULL) { type_ = kClientSocket; }
On 2011/11/08 09:57:08, Mads Ager wrote:
> Doesn't
> 
>   explicit ClientSocket(SOCKET s) : SocketHandle(s), next_(NULL) {
>     type_ = kClientSocket;
>   }
> 
> fit? That would be a more usual indentation.

Done.

http://codereview.chromium.org/8503006/diff/1/runtime/bin/eventhandler_win.h#...
runtime/bin/eventhandler_win.h:293: next_(NULL) { type_ = kClientSocket; }
On 2011/11/08 09:57:08, Mads Ager wrote:
> Ditto on the indentation.

Done.

Powered by Google App Engine
This is Rietveld 408576698