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

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

Issue 2365463004: Revert of Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called (Closed)
Patch Set: Created 4 years, 3 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 { 236 {
237 } 237 }
238 238
239 DOMWebSocket::~DOMWebSocket() 239 DOMWebSocket::~DOMWebSocket()
240 { 240 {
241 ASSERT(!m_channel); 241 ASSERT(!m_channel);
242 } 242 }
243 243
244 void DOMWebSocket::logError(const String& message) 244 void DOMWebSocket::logError(const String& message)
245 { 245 {
246 if (getExecutionContext()) 246 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, message));
247 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessag eSource, ErrorMessageLevel, message));
248 } 247 }
249 248
250 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState) 249 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
251 { 250 {
252 StringOrStringSequence protocols; 251 StringOrStringSequence protocols;
253 return create(context, url, protocols, exceptionState); 252 return create(context, url, protocols, exceptionState);
254 } 253 }
255 254
256 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, const StringOrStringSequence& protocols, ExceptionState& exceptionState) 255 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, const StringOrStringSequence& protocols, ExceptionState& exceptionState)
257 { 256 {
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 DEFINE_TRACE(DOMWebSocket) 788 DEFINE_TRACE(DOMWebSocket)
790 { 789 {
791 visitor->trace(m_channel); 790 visitor->trace(m_channel);
792 visitor->trace(m_eventQueue); 791 visitor->trace(m_eventQueue);
793 WebSocketChannelClient::trace(visitor); 792 WebSocketChannelClient::trace(visitor);
794 EventTargetWithInlineData::trace(visitor); 793 EventTargetWithInlineData::trace(visitor);
795 ActiveDOMObject::trace(visitor); 794 ActiveDOMObject::trace(visitor);
796 } 795 }
797 796
798 } // namespace blink 797 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698