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

Unified Diff: src/objects-inl.h

Issue 13552002: ES6 symbols: fix corner cases of equality operators (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « src/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 5c848800b37ab8ad90da48b05ba6c022db18f494..54c5238a01927dc7b7adba59e951893579bdb445 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2504,7 +2504,10 @@ void Name::set_hash_field(uint32_t value) {
bool Name::Equals(Name* other) {
if (other == this) return true;
- if (this->IsUniqueName() && other->IsUniqueName()) return false;
+ if (this->IsSymbol() || other->IsSymbol() ||
+ (this->IsInternalizedString() && other->IsInternalizedString())) {
+ return false;
+ }
return String::cast(this)->SlowEquals(String::cast(other));
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698