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

Unified Diff: runtime/bin/socket_patch.dart

Issue 269003002: Fix crash in raw_secure_server_socket_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix status file. Created 6 years, 7 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
« no previous file with comments | « runtime/bin/eventhandler_win.cc ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 030a9058cc9409517c0b116b94c071a970be7813..98de2a0bea00ed304ad9d19ff9fdcdbe506d2bae 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -824,6 +824,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
var handler = eventHandlers[i];
if (i == DESTROYED_EVENT) {
+ assert(isClosing);
assert(!isClosed);
isClosed = true;
closeCompleter.complete();
@@ -873,7 +874,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
sendWriteEvents = write;
if (read) issueReadEvent();
if (write) issueWriteEvent();
- if (eventPort == null) {
+ if (eventPort == null && !isClosing) {
int flags = typeFlags & TYPE_TYPE_MASK;
if (!isClosedRead) flags |= 1 << READ_EVENT;
if (!isClosedWrite) flags |= 1 << WRITE_EVENT;
@@ -936,6 +937,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
}
void connectToEventHandler() {
+ assert(!isClosed);
if (eventPort == null) {
eventPort = new RawReceivePort(multiplex);
_SocketsObservatory.add(this);
« no previous file with comments | « runtime/bin/eventhandler_win.cc ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698