OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |