Add DCHECK(), remove if statement to prevent NULL pointer dereference.

BUG=
TEST=
CID=102400
TBR=jamesr

Review URL: https://chromiumcodereview.appspot.com/10829028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148462 0039d316-1c4b-4281-b951-d872f2087c98
parent 1cfc04fe
...@@ -3307,12 +3307,11 @@ void RenderViewImpl::willSendRequest(WebFrame* frame, ...@@ -3307,12 +3307,11 @@ void RenderViewImpl::willSendRequest(WebFrame* frame,
content::PageTransition transition_type = content::PAGE_TRANSITION_LINK; content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
DocumentState* document_state = DocumentState::FromDataSource(data_source); DocumentState* document_state = DocumentState::FromDataSource(data_source);
DCHECK(document_state);
NavigationState* navigation_state = document_state->navigation_state(); NavigationState* navigation_state = document_state->navigation_state();
if (document_state) { if (document_state->is_cache_policy_override_set())
if (document_state->is_cache_policy_override_set()) request.setCachePolicy(document_state->cache_policy_override());
request.setCachePolicy(document_state->cache_policy_override()); transition_type = navigation_state->transition_type();
transition_type = navigation_state->transition_type();
}
WebKit::WebReferrerPolicy referrer_policy; WebKit::WebReferrerPolicy referrer_policy;
if (document_state && document_state->is_referrer_policy_set()) { if (document_state && document_state->is_referrer_policy_set()) {
......
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