Bug 1253358 - Assert no flags on several h2 frame types r=hurley
authorPatrick McManus <mcmanus@ducksong.com>
Thu, 03 Mar 2016 16:35:38 -0500
changeset 324958 7488a41b7ca5e04cdbd970c82b21bd1aa38706c5
parent 324957 f4556ef0897778dfb06c290d3b57999f3d6b3cae
child 324959 a87e26a12a988360cbfdc2d3773ec7d83a84712d
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershurley
bugs1253358
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253358 - Assert no flags on several h2 frame types r=hurley
netwerk/protocol/http/Http2Session.cpp
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -627,17 +627,21 @@ Http2Session::IncrementConcurrent(Http2S
 // dest must have 9 bytes of allocated space
 template<typename charType> void
 Http2Session::CreateFrameHeader(charType dest, uint16_t frameLength,
                                 uint8_t frameType, uint8_t frameFlags,
                                 uint32_t streamID)
 {
   MOZ_ASSERT(frameLength <= kMaxFrameData, "framelength too large");
   MOZ_ASSERT(!(streamID & 0x80000000));
-  MOZ_ASSERT(!frameFlags || (frameType != FRAME_TYPE_PRIORITY));
+  MOZ_ASSERT(!frameFlags ||
+             (frameType != FRAME_TYPE_PRIORITY &&
+              frameType != FRAME_TYPE_RST_STREAM &&
+              frameType != FRAME_TYPE_GOAWAY &&
+              frameType != FRAME_TYPE_WINDOW_UPDATE));
 
   dest[0] = 0x00;
   NetworkEndian::writeUint16(dest + 1, frameLength);
   dest[3] = frameType;
   dest[4] = frameFlags;
   NetworkEndian::writeUint32(dest + 5, streamID);
 }