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

Unified Diff: src/objects.cc

Issue 10700137: After transitioning to constant function, return the constant function as result of the assignment. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: u Created 8 years, 5 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 | test/mjsunit/regress/regress-2226.js » ('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 986198808569a3c52f86d87f741aab1600509707..cd2eebf0bcaa160cc0de20d4f794f858d928f5e7 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2959,7 +2959,7 @@ MaybeObject* JSObject::SetPropertyForResult(LookupResult* result,
// transition to the target map.
if (constant_function == *value) {
self->set_map(transition_map);
- return this;
+ return constant_function;
}
// Otherwise, replace with a map transition to a new map with a FIELD,
// even if the value is a constant function.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2226.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698