Commit 38cb1139 authored by yinjie's avatar yinjie Committed by Commit bot

Propagate SetDecoderHeaderTableDebugVisitor to the nested SpdyFramerDecoderAdapter.

Propagate force_use_new_methods_for_test and SetDecoderHeaderTableDebugVisitor to the nested SpdyFramerDecoderAdapter, if present. This fixes several test failures, if --use_nested_spdy_framer_decoder=true.

This CL lands server change 126441874 by jamessynge.

BUG=488484

Review-Url: https://codereview.chromium.org/2130193002
Cr-Commit-Position: refs/heads/master@{#404590}
parent 8490591e
......@@ -3233,7 +3233,11 @@ bool SpdyFramer::IncrementallyDeliverControlFrameHeaderData(
void SpdyFramer::SetDecoderHeaderTableDebugVisitor(
std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) {
GetHpackDecoder()->SetHeaderTableDebugVisitor(std::move(visitor));
if (decoder_adapter_ != nullptr) {
decoder_adapter_->SetDecoderHeaderTableDebugVisitor(std::move(visitor));
} else {
GetHpackDecoder()->SetHeaderTableDebugVisitor(std::move(visitor));
}
}
void SpdyFramer::SetEncoderHeaderTableDebugVisitor(
......
......@@ -218,6 +218,13 @@ class NestedSpdyFramerDecoder : public SpdyFramerDecoderAdapter {
framer_.set_debug_visitor(debug_visitor);
}
// Passes the call on to the wrapped SpdyFramer.
void SetDecoderHeaderTableDebugVisitor(
std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor)
override {
framer_.SetDecoderHeaderTableDebugVisitor(std::move(visitor));
}
// Passes the call on to the base adapter class and wrapped SpdyFramer.
void set_process_single_input_frame(bool v) override {
SpdyFramerDecoderAdapter::set_process_single_input_frame(v);
......
......@@ -37,6 +37,10 @@ class SpdyFramerDecoderAdapter {
return debug_visitor_;
}
// Set debug callbacks to be called from the HPACK decoder.
virtual void SetDecoderHeaderTableDebugVisitor(
std::unique_ptr<HpackHeaderTable::DebugVisitorInterface> visitor) = 0;
// Sets whether or not ProcessInput returns after finishing a frame, or
// continues processing additional frames. Normally ProcessInput processes
// all input, but this method enables the caller (and visitor) to work with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment