Chromium Code Reviews| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 522 void DOMWebSocket::setBinaryType(const String& binaryType) | 522 void DOMWebSocket::setBinaryType(const String& binaryType) |
| 523 { | 523 { |
| 524 if (binaryType == "blob") { | 524 if (binaryType == "blob") { |
| 525 m_binaryType = BinaryTypeBlob; | 525 m_binaryType = BinaryTypeBlob; |
| 526 return; | 526 return; |
| 527 } | 527 } |
| 528 if (binaryType == "arraybuffer") { | 528 if (binaryType == "arraybuffer") { |
| 529 m_binaryType = BinaryTypeArrayBuffer; | 529 m_binaryType = BinaryTypeArrayBuffer; |
| 530 return; | 530 return; |
| 531 } | 531 } |
| 532 logError("'" + binaryType + "' is not a valid value for binaryType; binaryTy pe remains unchanged."); | 532 ASSERT_NOT_REACHED(); |
|
Nils Barth (inactive)
2015/02/11 18:58:45
ASSERT sounds fine, thanks!
| |
| 533 } | 533 } |
| 534 | 534 |
| 535 const AtomicString& DOMWebSocket::interfaceName() const | 535 const AtomicString& DOMWebSocket::interfaceName() const |
| 536 { | 536 { |
| 537 return EventTargetNames::DOMWebSocket; | 537 return EventTargetNames::DOMWebSocket; |
| 538 } | 538 } |
| 539 | 539 |
| 540 ExecutionContext* DOMWebSocket::executionContext() const | 540 ExecutionContext* DOMWebSocket::executionContext() const |
| 541 { | 541 { |
| 542 return ActiveDOMObject::executionContext(); | 542 return ActiveDOMObject::executionContext(); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 658 void DOMWebSocket::trace(Visitor* visitor) | 658 void DOMWebSocket::trace(Visitor* visitor) |
| 659 { | 659 { |
| 660 visitor->trace(m_channel); | 660 visitor->trace(m_channel); |
| 661 visitor->trace(m_eventQueue); | 661 visitor->trace(m_eventQueue); |
| 662 WebSocketChannelClient::trace(visitor); | 662 WebSocketChannelClient::trace(visitor); |
| 663 RefCountedGarbageCollectedEventTargetWithInlineData<DOMWebSocket>::trace(vis itor); | 663 RefCountedGarbageCollectedEventTargetWithInlineData<DOMWebSocket>::trace(vis itor); |
| 664 ActiveDOMObject::trace(visitor); | 664 ActiveDOMObject::trace(visitor); |
| 665 } | 665 } |
| 666 | 666 |
| 667 } // namespace blink | 667 } // namespace blink |
| OLD | NEW |