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

Unified Diff: src/objects.cc

Issue 8143018: Revert "Added ability to lock strings to prevent their representation or encoding from changing." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 105dfd101edcf5033a603870a0c16319d2b8f1c2..68047754c87a74a68405694a947ed7cf36f92d2c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2812,8 +2812,7 @@ MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes(
attributes);
}
- // Unlike SetLocalProperty, we ignore the prototype chain and
- // any accessors in it.
+ // Check for accessor in prototype chain removed here in clone.
if (!result.IsFound()) {
// Neither properties nor transitions found.
return AddProperty(name, value, attributes, kNonStrictMode);
@@ -10214,8 +10213,6 @@ 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.
@@ -10226,14 +10223,16 @@ 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>(chars[i]));
+ hasher.AddCharacter(static_cast<uc32>(
+ string_->SeqAsciiStringGet(i + from_)));
i++;
}
// Process the remaining characters without updating the array
// index.
while (i < length_) {
- hasher.AddCharacterNoIndex(static_cast<uc32>(chars[i]));
+ hasher.AddCharacterNoIndex(static_cast<uc32>(
+ string_->SeqAsciiStringGet(i + from_)));
i++;
}
hash_field_ = hasher.GetHashField();
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698