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

Side by Side Diff: src/objects.cc

Issue 224903023: Fix invalid local property lookup for transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Whitespace fix Created 6 years, 8 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 | test/mjsunit/regress/regress-361025.js » ('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 4210 matching lines...) Expand 10 before | Expand all | Expand 10 after
4221 } 4221 }
4222 4222
4223 if (object->IsJSGlobalProxy()) { 4223 if (object->IsJSGlobalProxy()) {
4224 Handle<Object> proto(object->GetPrototype(), isolate); 4224 Handle<Object> proto(object->GetPrototype(), isolate);
4225 if (proto->IsNull()) return value; 4225 if (proto->IsNull()) return value;
4226 ASSERT(proto->IsJSGlobalObject()); 4226 ASSERT(proto->IsJSGlobalObject());
4227 return SetLocalPropertyIgnoreAttributes(Handle<JSObject>::cast(proto), 4227 return SetLocalPropertyIgnoreAttributes(Handle<JSObject>::cast(proto),
4228 name, value, attributes, value_type, mode, extensibility_check); 4228 name, value, attributes, value_type, mode, extensibility_check);
4229 } 4229 }
4230 4230
4231 if (lookup.IsFound() && 4231 if (lookup.IsInterceptor() ||
4232 (lookup.type() == INTERCEPTOR || lookup.type() == CALLBACKS)) { 4232 (lookup.IsDescriptorOrDictionary() && lookup.type() == CALLBACKS)) {
4233 object->LocalLookupRealNamedProperty(*name, &lookup); 4233 object->LocalLookupRealNamedProperty(*name, &lookup);
4234 } 4234 }
4235 4235
4236 // Check for accessor in prototype chain removed here in clone. 4236 // Check for accessor in prototype chain removed here in clone.
4237 if (!lookup.IsFound()) { 4237 if (!lookup.IsFound()) {
4238 object->map()->LookupTransition(*object, *name, &lookup); 4238 object->map()->LookupTransition(*object, *name, &lookup);
4239 TransitionFlag flag = lookup.IsFound() 4239 TransitionFlag flag = lookup.IsFound()
4240 ? OMIT_TRANSITION : INSERT_TRANSITION; 4240 ? OMIT_TRANSITION : INSERT_TRANSITION;
4241 // Neither properties nor transitions found. 4241 // Neither properties nor transitions found.
4242 return AddProperty(object, name, value, attributes, SLOPPY, 4242 return AddProperty(object, name, value, attributes, SLOPPY,
(...skipping 12468 matching lines...) Expand 10 before | Expand all | Expand 10 after
16711 #define ERROR_MESSAGES_TEXTS(C, T) T, 16711 #define ERROR_MESSAGES_TEXTS(C, T) T,
16712 static const char* error_messages_[] = { 16712 static const char* error_messages_[] = {
16713 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16713 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16714 }; 16714 };
16715 #undef ERROR_MESSAGES_TEXTS 16715 #undef ERROR_MESSAGES_TEXTS
16716 return error_messages_[reason]; 16716 return error_messages_[reason];
16717 } 16717 }
16718 16718
16719 16719
16720 } } // namespace v8::internal 16720 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-361025.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698