Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1260)

Unified Diff: url/origin.cc

Issue 2688573002: Allow a unique origin to compare equal to itself
Patch Set: Fix after rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | url/origin_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin.cc
diff --git a/url/origin.cc b/url/origin.cc
index e449532791a9ecf2ccd53659cf1c912ded682f8d..d09fdbcef2f617ec380fca2bf83cc8b3e3a0ae6c 100644
--- a/url/origin.cc
+++ b/url/origin.cc
@@ -160,6 +160,9 @@ GURL Origin::GetURL() const {
}
bool Origin::IsSameOriginWith(const Origin& other) const {
+ if (this == &other)
+ return true;
+
if (opaque_ || other.opaque_)
return false;
« no previous file with comments | « no previous file | url/origin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698