OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |