diff options
Diffstat (limited to 'www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp')
-rw-r--r-- | www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp b/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp index cca3c637187..e3aeb089c84 100644 --- a/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp +++ b/www/firefox/patches/patch-netwerk__protocol__websocket__WebSocketChannel.cpp @@ -1,4 +1,4 @@ -$NetBSD: patch-netwerk__protocol__websocket__WebSocketChannel.cpp,v 1.1 2013/06/21 23:11:42 ryoon Exp $ +$NetBSD: patch-netwerk__protocol__websocket__WebSocketChannel.cpp,v 1.2 2013/06/26 11:32:12 ryoon Exp $ # HG changeset patch # User Martin Husemann <martin@netbsd.org> @@ -8,14 +8,9 @@ $NetBSD: patch-netwerk__protocol__websocket__WebSocketChannel.cpp,v 1.1 2013/06/ Bug 871555: Use memcpy and properly aligned temporary variables instead of pointer casts with unclear alignment r=mcmanus diff netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/WebSocketChannel.cpp ---- netwerk/protocol/websocket/WebSocketChannel.cpp +--- netwerk/protocol/websocket/WebSocketChannel.cpp.orig 2013-06-17 22:13:23.000000000 +0000 +++ netwerk/protocol/websocket/WebSocketChannel.cpp -@@ -1627,17 +1627,18 @@ WebSocketChannel::PrimeNewOutgoingMessag - // payload is offset 6 including 4 for the mask - payload = mOutHeader + 6; - - // The close reason code sits in the first 2 bytes of payload - // If the channel user provided a code and reason during Close() +@@ -1632,7 +1632,8 @@ WebSocketChannel::PrimeNewOutgoingMessag // and there isn't an internal error, use that. if (NS_SUCCEEDED(mStopOnClose)) { if (mScriptCloseCode) { @@ -25,17 +20,7 @@ diff netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/ mOutHeader[1] += 2; mHdrOutToSend = 8; if (!mScriptCloseReason.IsEmpty()) { - NS_ABORT_IF_FALSE(mScriptCloseReason.Length() <= 123, - "Close Reason Too Long"); - mOutHeader[1] += mScriptCloseReason.Length(); - mHdrOutToSend += mScriptCloseReason.Length(); - memcpy (payload + 2, -@@ -1646,17 +1647,18 @@ WebSocketChannel::PrimeNewOutgoingMessag - } - } else { - // No close code/reason, so payload length = 0. We must still send mask - // even though it's not used. Keep payload offset so we write mask - // below. +@@ -1651,7 +1652,8 @@ WebSocketChannel::PrimeNewOutgoingMessag mHdrOutToSend = 6; } } else { @@ -45,17 +30,7 @@ diff netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/ mOutHeader[1] += 2; mHdrOutToSend = 8; } - - if (mServerClosed) { - /* bidi close complete */ - mReleaseOnTransmit = 1; - } else if (NS_FAILED(mStopOnClose)) { -@@ -1734,17 +1736,18 @@ WebSocketChannel::PrimeNewOutgoingMessag - LOG(("WebSocketChannel::PrimeNewOutgoingMessage(): " - "GenerateRandomBytes failure %x\n", rv)); - StopSession(rv); - return; - } +@@ -1739,7 +1741,8 @@ WebSocketChannel::PrimeNewOutgoingMessag mask = * reinterpret_cast<uint32_t *>(buffer); NS_Free(buffer); } while (!mask); @@ -65,9 +40,3 @@ diff netwerk/protocol/websocket/WebSocketChannel.cpp netwerk/protocol/websocket/ LOG(("WebSocketChannel::PrimeNewOutgoingMessage() using mask %08x\n", mask)); - // We don't mask the framing, but occasionally we stick a little payload - // data in the buffer used for the framing. Close frames are the current - // example. This data needs to be masked, but it is never more than a - // handful of bytes and might rotate the mask, so we can just do it locally. - // For real data frames we ship the bulk of the payload off to ApplyMask() - |