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

Unified Diff: src/objects.cc

Issue 40291: Fixed a bug exposed by the Mozilla test suite where the result of ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/global/
Patch Set: Created 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 1445)
+++ src/objects.cc (working copy)
@@ -456,8 +456,10 @@
JSGlobalPropertyCell::cast(property_dictionary()->ValueAt(entry));
cell->set_value(value);
store_value = cell;
Kasper Lund 2009/03/09 09:27:33 Remove. You're not going to use store_value from h
+ // No need to update the property dictionary.
+ } else {
+ property_dictionary()->SetStringEntry(entry, name, store_value, details);
Kasper Lund 2009/03/09 09:27:33 store_value -> value?
}
- property_dictionary()->SetStringEntry(entry, name, store_value, details);
return value;
}
@@ -1322,11 +1324,14 @@
Object* value,
PropertyAttributes attributes) {
PropertyDetails details = PropertyDetails(attributes, NORMAL);
+ Object* store_value = value;
if (IsJSGlobalObject()) {
- value = Heap::AllocateJSGlobalPropertyCell(value);
- if (value->IsFailure()) return value;
+ store_value = Heap::AllocateJSGlobalPropertyCell(value);
+ if (store_value->IsFailure()) return store_value;
}
- Object* result = property_dictionary()->AddStringEntry(name, value, details);
+ Object* result = property_dictionary()->AddStringEntry(name,
+ store_value,
+ details);
if (result->IsFailure()) return result;
if (property_dictionary() != result) {
set_properties(Dictionary::cast(result));
Kasper Lund 2009/03/09 09:27:33 Weird indentation.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698