Simplify frame type handling in SpdyStream method.
In SpdyStream::OnFrameWriteComplete(), remove early returns for specific, allowed frame types, remove CHECK on frame type, and replace them with an early return for any frame type other than HEADERS and DATA. The CHECK was not particularily useful, since it is okay not to take action when a frame write is complete, but with the CHECK in place one is forced to modify this method when adding a new frame type (that is why the reserved frame type logic got in there at https://crrev.com/c/1207750). This change makes the code easier to extend with potential future frame types like PRIORITY_UPDATE. Removing hardcoded reserved frame types formula is also beneficial, because special treatment of reserved frame types is potentially error-prone, and also goes against the spirit of GREASE. Change-Id: I53efa954411db42af051b4a06c7c3b30b969b0b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2615479Reviewed-by:David Schinazi <dschinazi@chromium.org> Commit-Queue: Bence Béky <bnc@chromium.org> Cr-Commit-Position: refs/heads/master@{#843002}
Showing
Please register or sign in to comment