| Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| index c9e0ec66b0f1fb819d8619d26ff76cf2801b2948..eab55d4bb8f914c05f68ae89f9f985fa6c281ddd 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
| @@ -451,12 +451,22 @@ void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier,
|
|
|
| void FrameFetchContext::dispatchDidFail(unsigned long identifier,
|
| const ResourceError& error,
|
| - bool isInternalRequest) {
|
| + bool isInternalRequest,
|
| + bool isDecodeError) {
|
| frame()->loader().progress().completeProgress(identifier);
|
| TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceFinish",
|
| TRACE_EVENT_SCOPE_THREAD, "data",
|
| InspectorResourceFinishEvent::data(identifier, 0, true));
|
| - InspectorInstrumentation::didFailLoading(frame(), identifier, error);
|
| + if (isDecodeError) {
|
| + // In case of DecodeError, pretend as load finish only to inspector, in
|
| + // order to let inspector to
|
| + // - show the contents of the Resource, and
|
| + // - show the Resource in the resources tree.
|
| + InspectorInstrumentation::didFinishLoading(
|
| + frame(), identifier, 0, WebURLLoaderClient::kUnknownEncodedDataLength);
|
| + } else {
|
| + InspectorInstrumentation::didFailLoading(frame(), identifier, error);
|
| + }
|
| // Notification to FrameConsole should come AFTER InspectorInstrumentation
|
| // call, DevTools front-end relies on this.
|
| if (!isInternalRequest)
|
|
|