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

Unified Diff: content/browser/shared_worker/shared_worker_instance.cc

Issue 2604733002: SharedWorker: Make shared workers keyed by a pair of url and name (Closed)
Patch Set: clean up Created 4 years 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 | content/browser/shared_worker/shared_worker_instance_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/shared_worker/shared_worker_instance.cc
diff --git a/content/browser/shared_worker/shared_worker_instance.cc b/content/browser/shared_worker/shared_worker_instance.cc
index 282cf190515772755d10bb94580bbc7512bdade5..83a631cd5da8343faf30303081f529361d9a33d4 100644
--- a/content/browser/shared_worker/shared_worker_instance.cc
+++ b/content/browser/shared_worker/shared_worker_instance.cc
@@ -57,10 +57,9 @@ bool SharedWorkerInstance::Matches(const GURL& match_url,
if (url_.GetOrigin() != match_url.GetOrigin())
return false;
- if (name_.empty() && match_name.empty())
- return url_ == match_url;
-
- return name_ == match_name;
+ if (name_ != match_name || url_ != match_url)
+ return false;
+ return true;
}
bool SharedWorkerInstance::Matches(const SharedWorkerInstance& other) const {
« no previous file with comments | « no previous file | content/browser/shared_worker/shared_worker_instance_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698