Commit 2fa3361b authored by Johannes Henkel's avatar Johannes Henkel Committed by Commit Bot

Always default initialize WebURLError::extended_reason_ to 0.

I think it's better to do this directly on the field decl
in the header than with every single constructor since
it's easy to forget it there: at the moment it's missing
from the third constructor in the .cc. It's possible that this
makes no difference thus far but it's better to initialize it
to avoid undefined behavior.

R=caseq

Change-Id: Ifd3e6b320bae593f9400f30ca7dc4769c391afb5
Reviewed-on: https://chromium-review.googlesource.com/1038820Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555662}
parent 9618adde
...@@ -78,7 +78,7 @@ struct WebURLError { ...@@ -78,7 +78,7 @@ struct WebURLError {
int reason_; int reason_;
// Additional information based on the reason_. // Additional information based on the reason_.
int extended_reason_; int extended_reason_ = 0;
// A flag showing whether or not we have a (possibly stale) copy of the // A flag showing whether or not we have a (possibly stale) copy of the
// requested resource in the cache. // requested resource in the cache.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace blink { namespace blink {
WebURLError::WebURLError(int reason, const WebURL& url) WebURLError::WebURLError(int reason, const WebURL& url)
: reason_(reason), extended_reason_(0), url_(url) { : reason_(reason), url_(url) {
DCHECK_NE(reason_, 0); DCHECK_NE(reason_, 0);
} }
......
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