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

Unified Diff: src/lookup.cc

Issue 804993002: Internalize strings being stored into uninitialized property cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 6 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 | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 55e9d689a118765c97256aee5d5f98a8138d3ce2..6a540de4df621f82adda771e9007fa5ac9adae40 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -289,7 +289,7 @@ Handle<Object> LookupIterator::GetDataValue() const {
}
-void LookupIterator::WriteDataValue(Handle<Object> value) {
+Handle<Object> LookupIterator::WriteDataValue(Handle<Object> value) {
DCHECK_EQ(DATA, state_);
Handle<JSObject> holder = GetHolder<JSObject>();
if (holder_map_->is_dictionary_map()) {
@@ -297,7 +297,7 @@ void LookupIterator::WriteDataValue(Handle<Object> value) {
if (holder->IsGlobalObject()) {
Handle<PropertyCell> cell(
PropertyCell::cast(property_dictionary->ValueAt(dictionary_entry())));
- PropertyCell::SetValueInferType(cell, value);
+ value = PropertyCell::SetValueInferType(cell, value);
} else {
property_dictionary->ValueAtPut(dictionary_entry(), *value);
}
@@ -306,6 +306,7 @@ void LookupIterator::WriteDataValue(Handle<Object> value) {
} else {
DCHECK_EQ(v8::internal::CONSTANT, property_details_.type());
}
+ return value;
}
« no previous file with comments | « src/lookup.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698