Index: pdf/out_of_process_instance.cc |
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc |
index eb1c17a022a4d67a78c2a5c83f29e1c109e630a3..627b31f5f576a051dff962fce83dad88961724cb 100644 |
--- a/pdf/out_of_process_instance.cc |
+++ b/pdf/out_of_process_instance.cc |
@@ -846,13 +846,8 @@ void OutOfProcessInstance::OnPaint( |
} |
void OutOfProcessInstance::DidOpen(int32_t result) { |
- if (result == PP_OK) { |
- if (!engine_->HandleDocumentLoad(embed_loader_)) { |
- document_load_state_ = LOAD_STATE_LOADING; |
- DocumentLoadFailed(); |
- } |
- } else if (result != PP_ERROR_ABORTED) { // Can happen in tests. |
- NOTREACHED(); |
+ if (result != PP_OK || !engine_->HandleDocumentLoad(embed_loader_)) { |
+ document_load_state_ = LOAD_STATE_LOADING; |
Lei Zhang
2016/11/08 01:28:10
Side note: I wonder if this is actually needed to
raymes
2016/11/08 06:00:01
Done.
Lei Zhang
2016/11/08 07:19:31
Wasn't expecting this change, but if it works, the
|
DocumentLoadFailed(); |
} |
} |
@@ -1450,6 +1445,7 @@ void OutOfProcessInstance::LoadUrlInternal( |
pp::URLRequestInfo request(this); |
request.SetURL(url); |
request.SetMethod("GET"); |
+ request.SetFollowRedirects(false); |
*loader = CreateURLLoaderInternal(); |
pp::CompletionCallback callback = loader_factory_.NewCallback(method); |