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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp

Issue 1456463002: [WebSocket] Remove release assertions that are no longer needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 Document* DocumentWebSocketChannel::document() 383 Document* DocumentWebSocketChannel::document()
384 { 384 {
385 // This context is always a Document. See the constructor. 385 // This context is always a Document. See the constructor.
386 ExecutionContext* context = executionContext(); 386 ExecutionContext* context = executionContext();
387 ASSERT(context->isDocument()); 387 ASSERT(context->isDocument());
388 return toDocument(context); 388 return toDocument(context);
389 } 389 }
390 390
391 void DocumentWebSocketChannel::handleShouldBeDisconnected()
392 {
393 RELEASE_ASSERT(!m_handle);
394 }
395
396 void DocumentWebSocketChannel::didConnect(WebSocketHandle* handle, const WebStri ng& selectedProtocol, const WebString& extensions) 391 void DocumentWebSocketChannel::didConnect(WebSocketHandle* handle, const WebStri ng& selectedProtocol, const WebString& extensions)
397 { 392 {
398 WTF_LOG(Network, "DocumentWebSocketChannel %p didConnect(%p, %s, %s)", this, handle, selectedProtocol.utf8().c_str(), extensions.utf8().c_str()); 393 WTF_LOG(Network, "DocumentWebSocketChannel %p didConnect(%p, %s, %s)", this, handle, selectedProtocol.utf8().c_str(), extensions.utf8().c_str());
399 394
400 ASSERT(m_handle); 395 ASSERT(m_handle);
401 ASSERT(handle == m_handle); 396 ASSERT(handle == m_handle);
402 ASSERT(m_client); 397 ASSERT(m_client);
403 398
404 m_client->didConnect(selectedProtocol, extensions); 399 m_client->didConnect(selectedProtocol, extensions);
405 } 400 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 555
561 DEFINE_TRACE(DocumentWebSocketChannel) 556 DEFINE_TRACE(DocumentWebSocketChannel)
562 { 557 {
563 visitor->trace(m_blobLoader); 558 visitor->trace(m_blobLoader);
564 visitor->trace(m_client); 559 visitor->trace(m_client);
565 WebSocketChannel::trace(visitor); 560 WebSocketChannel::trace(visitor);
566 ContextLifecycleObserver::trace(visitor); 561 ContextLifecycleObserver::trace(visitor);
567 } 562 }
568 563
569 } // namespace blink 564 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698