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

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

Issue 2367753002: Reland 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 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessageSou rce, ErrorMessageLevel, message)); 246 if (getExecutionContext())
247 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(JSMessag eSource, ErrorMessageLevel, message));
247 } 248 }
248 249
249 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState) 250 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
250 { 251 {
251 StringOrStringSequence protocols; 252 StringOrStringSequence protocols;
252 return create(context, url, protocols, exceptionState); 253 return create(context, url, protocols, exceptionState);
253 } 254 }
254 255
255 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, const StringOrStringSequence& protocols, ExceptionState& exceptionState) 256 DOMWebSocket* DOMWebSocket::create(ExecutionContext* context, const String& url, const StringOrStringSequence& protocols, ExceptionState& exceptionState)
256 { 257 {
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 DEFINE_TRACE(DOMWebSocket) 789 DEFINE_TRACE(DOMWebSocket)
789 { 790 {
790 visitor->trace(m_channel); 791 visitor->trace(m_channel);
791 visitor->trace(m_eventQueue); 792 visitor->trace(m_eventQueue);
792 WebSocketChannelClient::trace(visitor); 793 WebSocketChannelClient::trace(visitor);
793 EventTargetWithInlineData::trace(visitor); 794 EventTargetWithInlineData::trace(visitor);
794 ActiveDOMObject::trace(visitor); 795 ActiveDOMObject::trace(visitor);
795 } 796 }
796 797
797 } // namespace blink 798 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698