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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 const AtomicString& DOMWebSocket::interfaceName() const { 647 const AtomicString& DOMWebSocket::interfaceName() const {
648 return EventTargetNames::DOMWebSocket; 648 return EventTargetNames::DOMWebSocket;
649 } 649 }
650 650
651 ExecutionContext* DOMWebSocket::getExecutionContext() const { 651 ExecutionContext* DOMWebSocket::getExecutionContext() const {
652 return SuspendableObject::getExecutionContext(); 652 return SuspendableObject::getExecutionContext();
653 } 653 }
654 654
655 void DOMWebSocket::contextDestroyed() { 655 void DOMWebSocket::contextDestroyed(ExecutionContext*) {
656 NETWORK_DVLOG(1) << "WebSocket " << this << " contextDestroyed()"; 656 NETWORK_DVLOG(1) << "WebSocket " << this << " contextDestroyed()";
657 m_eventQueue->contextDestroyed(); 657 m_eventQueue->contextDestroyed();
658 if (m_channel) { 658 if (m_channel) {
659 m_channel->close(WebSocketChannel::CloseEventCodeGoingAway, String()); 659 m_channel->close(WebSocketChannel::CloseEventCodeGoingAway, String());
660 releaseChannel(); 660 releaseChannel();
661 } 661 }
662 if (m_state != kClosed) { 662 if (m_state != kClosed) {
663 m_state = kClosed; 663 m_state = kClosed;
664 logBinaryTypeChangesAfterOpen(); 664 logBinaryTypeChangesAfterOpen();
665 } 665 }
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 859
860 DEFINE_TRACE(DOMWebSocket) { 860 DEFINE_TRACE(DOMWebSocket) {
861 visitor->trace(m_channel); 861 visitor->trace(m_channel);
862 visitor->trace(m_eventQueue); 862 visitor->trace(m_eventQueue);
863 WebSocketChannelClient::trace(visitor); 863 WebSocketChannelClient::trace(visitor);
864 EventTargetWithInlineData::trace(visitor); 864 EventTargetWithInlineData::trace(visitor);
865 SuspendableObject::trace(visitor); 865 SuspendableObject::trace(visitor);
866 } 866 }
867 867
868 } // namespace blink 868 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698