summaryrefslogtreecommitdiffstats
path: root/url/gurl.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 09:07:22 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-22 09:07:22 +0000
commit248fa6ff5b8f337efcdca19134f60c81bcac5113 (patch)
treed288181257f1311b3ad5b74f66cac327064438b4 /url/gurl.cc
parentd8a6c74f4c822edb36d3ef03932cae21c708ddfe (diff)
downloadchromium_src-248fa6ff5b8f337efcdca19134f60c81bcac5113.zip
chromium_src-248fa6ff5b8f337efcdca19134f60c81bcac5113.tar.gz
chromium_src-248fa6ff5b8f337efcdca19134f60c81bcac5113.tar.bz2
Fix bug in GURL with self-assignment and non-NULL inner_url_
BUG=309975 R=darin@chromium.org Review URL: https://codereview.chromium.org/32583006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url/gurl.cc')
-rw-r--r--url/gurl.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/url/gurl.cc b/url/gurl.cc
index 229df5d..7997d22 100644
--- a/url/gurl.cc
+++ b/url/gurl.cc
@@ -169,6 +169,9 @@ GURL::~GURL() {
}
GURL& GURL::operator=(const GURL& other) {
+ if (&other == this)
+ return *this;
+
spec_ = other.spec_;
is_valid_ = other.is_valid_;
parsed_ = other.parsed_;