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

Side by Side Diff: src/objects.cc

Issue 556040: Changed DefineGetterSetter to also set the right attributes when an... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 break; 2832 break;
2833 } 2833 }
2834 } else { 2834 } else {
2835 // Lookup the name. 2835 // Lookup the name.
2836 LookupResult result; 2836 LookupResult result;
2837 LocalLookup(name, &result); 2837 LocalLookup(name, &result);
2838 if (result.IsValid()) { 2838 if (result.IsValid()) {
2839 if (result.IsReadOnly()) return Heap::undefined_value(); 2839 if (result.IsReadOnly()) return Heap::undefined_value();
2840 if (result.type() == CALLBACKS) { 2840 if (result.type() == CALLBACKS) {
2841 Object* obj = result.GetCallbackObject(); 2841 Object* obj = result.GetCallbackObject();
2842 if (obj->IsFixedArray()) return obj; 2842 if (obj->IsFixedArray()) {
2843 PropertyDetails details = PropertyDetails(attributes, CALLBACKS);
2844 SetNormalizedProperty(name, obj, details);
2845 return obj;
2846 }
2843 } 2847 }
2844 } 2848 }
2845 } 2849 }
2846 2850
2847 // Allocate the fixed array to hold getter and setter. 2851 // Allocate the fixed array to hold getter and setter.
2848 Object* structure = Heap::AllocateFixedArray(2, TENURED); 2852 Object* structure = Heap::AllocateFixedArray(2, TENURED);
2849 if (structure->IsFailure()) return structure; 2853 if (structure->IsFailure()) return structure;
2850 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); 2854 PropertyDetails details = PropertyDetails(attributes, CALLBACKS);
2851 2855
2852 if (is_element) { 2856 if (is_element) {
(...skipping 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after
8297 if (break_point_objects()->IsUndefined()) return 0; 8301 if (break_point_objects()->IsUndefined()) return 0;
8298 // Single beak point. 8302 // Single beak point.
8299 if (!break_point_objects()->IsFixedArray()) return 1; 8303 if (!break_point_objects()->IsFixedArray()) return 1;
8300 // Multiple break points. 8304 // Multiple break points.
8301 return FixedArray::cast(break_point_objects())->length(); 8305 return FixedArray::cast(break_point_objects())->length();
8302 } 8306 }
8303 #endif 8307 #endif
8304 8308
8305 8309
8306 } } // namespace v8::internal 8310 } } // namespace v8::internal
OLDNEW
« 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