Changeset 95025 in webkit
- Timestamp:
- Sep 13, 2011 6:25:18 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95023 r95025 1 2011-09-13 Yuta Kitamura <yutak@chromium.org> 2 3 ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. 4 https://bugs.webkit.org/show_bug.cgi?id=67908 5 6 Reviewed by David Levin. 7 8 Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector<UChar>. 9 10 No change in functionality, thus no new tests. WebSocket worker tests 11 (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. 12 13 * websockets/ThreadableWebSocketChannelClientWrapper.cpp: 14 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): 15 (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): 16 Create a String from Vector<UChar>. 17 (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): 18 Copy the content of the given String into Vector. 19 * websockets/ThreadableWebSocketChannelClientWrapper.h: 20 1 21 2011-09-13 Fumitoshi Ukai <ukai@chromium.org> 2 22 -
trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp
r94482 r95025 45 45 , m_syncMethodDone(false) 46 46 , m_useHixie76Protocol(true) 47 , m_subprotocol("")48 47 , m_sendRequestResult(false) 49 48 , m_bufferedAmount(0) … … 84 83 String ThreadableWebSocketChannelClientWrapper::subprotocol() const 85 84 { 86 return m_subprotocol;85 return String(m_subprotocol); 87 86 } 88 87 89 88 void ThreadableWebSocketChannelClientWrapper::setSubprotocol(const String& subprotocol) 90 89 { 91 m_subprotocol = subprotocol; 90 unsigned length = subprotocol.length(); 91 m_subprotocol.resize(length); 92 if (length) 93 memcpy(m_subprotocol.data(), subprotocol.characters(), sizeof(UChar) * length); 92 94 } 93 95 -
trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h
r94482 r95025 94 94 bool m_syncMethodDone; 95 95 bool m_useHixie76Protocol; 96 Stringm_subprotocol;96 Vector<UChar> m_subprotocol; 97 97 bool m_sendRequestResult; 98 98 unsigned long m_bufferedAmount;
Note: See TracChangeset
for help on using the changeset viewer.