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

Unified Diff: src/objects-inl.h

Issue 2811333002: [builtins] HasOwnProperty: handle non-internalized string keys (Closed)
Patch Set: fix Created 3 years, 8 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 04e0511a57846fcda7a9734c8c49c4cf06fa1f1d..9f84314aa65fc22d3a82e8aa6a1c559d377db018 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -831,6 +831,11 @@ bool String::HasOnlyOneByteChars() {
IsOneByteRepresentation();
}
+bool StringShape::HasOnlyOneByteChars() {
+ return (type_ & kStringEncodingMask) == kOneByteStringTag ||
+ (type_ & kOneByteDataHintMask) == kOneByteDataHintTag;
+}
+
bool StringShape::IsCons() {
return (type_ & kStringRepresentationMask) == kConsStringTag;
}
« src/objects.cc ('K') | « src/objects.cc ('k') | src/objects/string-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698