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

Side by Side Diff: src/objects.cc

Issue 647014: Add a test case for issue 618 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/bugs/618.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 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 4827 matching lines...) Expand 10 before | Expand all | Expand 10 after
4838 ASSERT(prototype->IsNull()); 4838 ASSERT(prototype->IsNull());
4839 return true; 4839 return true;
4840 } 4840 }
4841 4841
4842 // Traverse the proposed prototype chain looking for setters for properties of 4842 // Traverse the proposed prototype chain looking for setters for properties of
4843 // the same names as are set by the inline constructor. 4843 // the same names as are set by the inline constructor.
4844 for (Object* obj = prototype; 4844 for (Object* obj = prototype;
4845 obj != Heap::null_value(); 4845 obj != Heap::null_value();
4846 obj = obj->GetPrototype()) { 4846 obj = obj->GetPrototype()) {
4847 JSObject* js_object = JSObject::cast(obj); 4847 JSObject* js_object = JSObject::cast(obj);
4848 if (!js_object->HasFastProperties()) {
4849 // Only allow fast case objects, as the map check in the inline
4850 // constructor which check for changes to the prototype chain cannot
4851 // handle dictionary case objects.
4852 return false;
4853 }
4854 for (int i = 0; i < this_property_assignments_count(); i++) { 4848 for (int i = 0; i < this_property_assignments_count(); i++) {
4855 LookupResult result; 4849 LookupResult result;
4856 String* name = GetThisPropertyAssignmentName(i); 4850 String* name = GetThisPropertyAssignmentName(i);
4857 js_object->LocalLookupRealNamedProperty(name, &result); 4851 js_object->LocalLookupRealNamedProperty(name, &result);
4858 if (result.IsValid() && result.type() == CALLBACKS) { 4852 if (result.IsValid() && result.type() == CALLBACKS) {
4859 return false; 4853 return false;
4860 } 4854 }
4861 } 4855 }
4862 } 4856 }
4863 4857
(...skipping 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after
8386 if (break_point_objects()->IsUndefined()) return 0; 8380 if (break_point_objects()->IsUndefined()) return 0;
8387 // Single beak point. 8381 // Single beak point.
8388 if (!break_point_objects()->IsFixedArray()) return 1; 8382 if (!break_point_objects()->IsFixedArray()) return 1;
8389 // Multiple break points. 8383 // Multiple break points.
8390 return FixedArray::cast(break_point_objects())->length(); 8384 return FixedArray::cast(break_point_objects())->length();
8391 } 8385 }
8392 #endif 8386 #endif
8393 8387
8394 8388
8395 } } // namespace v8::internal 8389 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/bugs/618.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698