summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/SocketStreamHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/SocketStreamHandle.cpp')
-rw-r--r--Source/WebKit/chromium/src/SocketStreamHandle.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/WebKit/chromium/src/SocketStreamHandle.cpp b/Source/WebKit/chromium/src/SocketStreamHandle.cpp
index 5eed90011..3f98a77db 100644
--- a/Source/WebKit/chromium/src/SocketStreamHandle.cpp
+++ b/Source/WebKit/chromium/src/SocketStreamHandle.cpp
@@ -37,10 +37,9 @@
#include "Logging.h"
#include "NotImplemented.h"
#include "SocketStreamHandleClient.h"
-#include "platform/WebData.h"
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "platform/WebSocketStreamHandle.h"
+#include <public/Platform.h>
+#include <public/WebData.h>
+#include <public/WebSocketStreamHandle.h>
#include <wtf/PassOwnPtr.h>
using namespace WebKit;
@@ -73,7 +72,13 @@ void SocketStreamHandleInternal::connect(const KURL& url)
int SocketStreamHandleInternal::send(const char* data, int len)
{
LOG(Network, "send len=%d", len);
- ASSERT(m_socket);
+ // FIXME: |m_socket| should not be null here, but it seems that there is the
+ // case. We should figure out such a path and fix it rather than checking
+ // null here.
+ if (!m_socket) {
+ LOG(Network, "m_socket is null when sending. It should not be.");
+ return 0;
+ }
if (m_pendingAmountSent + len >= m_maxPendingSendAllowed)
len = m_maxPendingSendAllowed - m_pendingAmountSent - 1;