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

Side by Side Diff: Source/modules/websockets/MainThreadWebSocketChannel.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/mediasource/WebKitMediaSource.cpp ('k') | Source/web/ApplicationCacheHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (m_handshake->mode() == WebSocketHandshake::Incomplete) { 427 if (m_handshake->mode() == WebSocketHandshake::Incomplete) {
428 int headerLength = m_handshake->readServerHandshake(m_buffer.data(), m_b uffer.size()); 428 int headerLength = m_handshake->readServerHandshake(m_buffer.data(), m_b uffer.size());
429 if (headerLength <= 0) 429 if (headerLength <= 0)
430 return false; 430 return false;
431 if (m_handshake->mode() == WebSocketHandshake::Connected) { 431 if (m_handshake->mode() == WebSocketHandshake::Connected) {
432 if (m_identifier) 432 if (m_identifier)
433 InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(m _document, m_identifier, m_handshake->serverHandshakeResponse()); 433 InspectorInstrumentation::didReceiveWebSocketHandshakeResponse(m _document, m_identifier, m_handshake->serverHandshakeResponse());
434 if (!m_handshake->serverSetCookie().isEmpty()) { 434 if (!m_handshake->serverSetCookie().isEmpty()) {
435 if (cookiesEnabled(m_document)) { 435 if (cookiesEnabled(m_document)) {
436 // Exception (for sandboxed documents) ignored. 436 // Exception (for sandboxed documents) ignored.
437 m_document->setCookie(m_handshake->serverSetCookie(), IGNORE _EXCEPTION_STATE); 437 m_document->setCookie(m_handshake->serverSetCookie(), IGNORE _EXCEPTION);
438 } 438 }
439 } 439 }
440 // FIXME: handle set-cookie2. 440 // FIXME: handle set-cookie2.
441 LOG(Network, "MainThreadWebSocketChannel %p Connected", this); 441 LOG(Network, "MainThreadWebSocketChannel %p Connected", this);
442 skipBuffer(headerLength); 442 skipBuffer(headerLength);
443 m_client->didConnect(); 443 m_client->didConnect();
444 LOG(Network, "MainThreadWebSocketChannel %p %lu bytes remaining in m _buffer", this, static_cast<unsigned long>(m_buffer.size())); 444 LOG(Network, "MainThreadWebSocketChannel %p %lu bytes remaining in m _buffer", this, static_cast<unsigned long>(m_buffer.size()));
445 return !m_buffer.isEmpty(); 445 return !m_buffer.isEmpty();
446 } 446 }
447 ASSERT(m_handshake->mode() == WebSocketHandshake::Failed); 447 ASSERT(m_handshake->mode() == WebSocketHandshake::Failed);
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 808 }
809 809
810 Vector<char> frameData; 810 Vector<char> frameData;
811 frame.makeFrameData(frameData); 811 frame.makeFrameData(frameData);
812 812
813 m_perMessageDeflate.resetDeflateBuffer(); 813 m_perMessageDeflate.resetDeflateBuffer();
814 return m_handle->send(frameData.data(), frameData.size()); 814 return m_handle->send(frameData.data(), frameData.size());
815 } 815 }
816 816
817 } // namespace WebCore 817 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/mediasource/WebKitMediaSource.cpp ('k') | Source/web/ApplicationCacheHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698