| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 void MainThreadWebSocketChannel::didFinishLoading() | 373 void MainThreadWebSocketChannel::didFinishLoading() |
| 374 { | 374 { |
| 375 LOG(Network, "MainThreadWebSocketChannel %p didFinishLoading()", this); | 375 LOG(Network, "MainThreadWebSocketChannel %p didFinishLoading()", this); |
| 376 ASSERT(m_blobLoader); | 376 ASSERT(m_blobLoader); |
| 377 ASSERT(m_blobLoaderStatus == BlobLoaderStarted); | 377 ASSERT(m_blobLoaderStatus == BlobLoaderStarted); |
| 378 m_blobLoaderStatus = BlobLoaderFinished; | 378 m_blobLoaderStatus = BlobLoaderFinished; |
| 379 processOutgoingFrameQueue(); | 379 processOutgoingFrameQueue(); |
| 380 deref(); | 380 deref(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void MainThreadWebSocketChannel::didFail(int errorCode) | 383 void MainThreadWebSocketChannel::didFail(FileError::ErrorCode errorCode) |
| 384 { | 384 { |
| 385 LOG(Network, "MainThreadWebSocketChannel %p didFail() errorCode=%d", this, e
rrorCode); | 385 LOG(Network, "MainThreadWebSocketChannel %p didFail() errorCode=%d", this, e
rrorCode); |
| 386 ASSERT(m_blobLoader); | 386 ASSERT(m_blobLoader); |
| 387 ASSERT(m_blobLoaderStatus == BlobLoaderStarted); | 387 ASSERT(m_blobLoaderStatus == BlobLoaderStarted); |
| 388 m_blobLoader.clear(); | 388 m_blobLoader.clear(); |
| 389 m_blobLoaderStatus = BlobLoaderFailed; | 389 m_blobLoaderStatus = BlobLoaderFailed; |
| 390 failAsError("Failed to load Blob: error code = " + String::number(errorCode)
); // FIXME: Generate human-friendly reason message. | 390 failAsError("Failed to load Blob: error code = " + String::number(errorCode)
); // FIXME: Generate human-friendly reason message. |
| 391 deref(); | 391 deref(); |
| 392 } | 392 } |
| 393 | 393 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 } | 810 } |
| 811 | 811 |
| 812 Vector<char> frameData; | 812 Vector<char> frameData; |
| 813 frame.makeFrameData(frameData); | 813 frame.makeFrameData(frameData); |
| 814 | 814 |
| 815 m_perMessageDeflate.resetDeflateBuffer(); | 815 m_perMessageDeflate.resetDeflateBuffer(); |
| 816 return m_handle->send(frameData.data(), frameData.size()); | 816 return m_handle->send(frameData.data(), frameData.size()); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace WebCore | 819 } // namespace WebCore |
| OLD | NEW |