Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 2cdc689059898362b188889eaf37c5ab959eb1bd..51239f6ab93f9f5f000d9719a580097911efc35a 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2682,7 +2682,8 @@ MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes( |
attributes); |
} |
- // Check for accessor in prototype chain removed here in clone. |
+ // Unlike SetLocalProperty, we ignore the prototype chain and |
+ // any accessors in it. |
if (!result.IsFound()) { |
// Neither properties nor transitions found. |
return AddProperty(name, value, attributes, kNonStrictMode); |
@@ -9935,6 +9936,8 @@ class SubStringAsciiSymbolKey : public HashTableKey { |
ASSERT(length_ >= 0); |
ASSERT(from_ + length_ <= string_->length()); |
StringHasher hasher(length_); |
+ AssertNoAllocation no_alloc; |
+ const char* chars = string_->GetChars() + from_; |
// Very long strings have a trivial hash that doesn't inspect the |
// string contents. |
@@ -9945,16 +9948,14 @@ class SubStringAsciiSymbolKey : public HashTableKey { |
// Do the iterative array index computation as long as there is a |
// chance this is an array index. |
while (i < length_ && hasher.is_array_index()) { |
- hasher.AddCharacter(static_cast<uc32>( |
- string_->SeqAsciiStringGet(i + from_))); |
+ hasher.AddCharacter(static_cast<uc32>(chars[i])); |
i++; |
} |
// Process the remaining characters without updating the array |
// index. |
while (i < length_) { |
- hasher.AddCharacterNoIndex(static_cast<uc32>( |
- string_->SeqAsciiStringGet(i + from_))); |
+ hasher.AddCharacterNoIndex(static_cast<uc32>(chars[i])); |
i++; |
} |
hash_field_ = hasher.GetHashField(); |