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

Side by Side Diff: src/objects.cc

Issue 134733011: Don't overwrite transitions in SetPropertyIgnoreAttributes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding regression test Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after
4211 name, value, attributes, value_type, mode, extensibility_check); 4211 name, value, attributes, value_type, mode, extensibility_check);
4212 } 4212 }
4213 4213
4214 if (lookup.IsFound() && 4214 if (lookup.IsFound() &&
4215 (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) { 4215 (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) {
4216 object->LocalLookupRealNamedProperty(*name, &lookup); 4216 object->LocalLookupRealNamedProperty(*name, &lookup);
4217 } 4217 }
4218 4218
4219 // Check for accessor in prototype chain removed here in clone. 4219 // Check for accessor in prototype chain removed here in clone.
4220 if (!lookup.IsFound()) { 4220 if (!lookup.IsFound()) {
4221 object->map()->LookupTransition(*object, *name, &lookup);
4222 TransitionFlag flag = lookup.IsFound()
4223 ? OMIT_TRANSITION : INSERT_TRANSITION;
4221 // Neither properties nor transitions found. 4224 // Neither properties nor transitions found.
4222 return AddProperty(object, name, value, attributes, kNonStrictMode, 4225 return AddProperty(object, name, value, attributes, kNonStrictMode,
4223 MAY_BE_STORE_FROM_KEYED, extensibility_check, value_type, mode); 4226 MAY_BE_STORE_FROM_KEYED, extensibility_check, value_type, mode, flag);
4224 } 4227 }
4225 4228
4226 Handle<Object> old_value = isolate->factory()->the_hole_value(); 4229 Handle<Object> old_value = isolate->factory()->the_hole_value();
4227 PropertyAttributes old_attributes = ABSENT; 4230 PropertyAttributes old_attributes = ABSENT;
4228 bool is_observed = FLAG_harmony_observation && 4231 bool is_observed = FLAG_harmony_observation &&
4229 object->map()->is_observed() && 4232 object->map()->is_observed() &&
4230 *name != isolate->heap()->hidden_string(); 4233 *name != isolate->heap()->hidden_string();
4231 if (is_observed && lookup.IsProperty()) { 4234 if (is_observed && lookup.IsProperty()) {
4232 if (lookup.IsDataProperty()) old_value = 4235 if (lookup.IsDataProperty()) old_value =
4233 Object::GetProperty(object, name); 4236 Object::GetProperty(object, name);
(...skipping 12367 matching lines...) Expand 10 before | Expand all | Expand 10 after
16601 #define ERROR_MESSAGES_TEXTS(C, T) T, 16604 #define ERROR_MESSAGES_TEXTS(C, T) T,
16602 static const char* error_messages_[] = { 16605 static const char* error_messages_[] = {
16603 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16606 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16604 }; 16607 };
16605 #undef ERROR_MESSAGES_TEXTS 16608 #undef ERROR_MESSAGES_TEXTS
16606 return error_messages_[reason]; 16609 return error_messages_[reason];
16607 } 16610 }
16608 16611
16609 16612
16610 } } // namespace v8::internal 16613 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698