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

Side by Side Diff: src/objects.cc

Issue 647010: Added access check to SetNormalizedProperty which is used from runtime Define... (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 | src/runtime.cc » ('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 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 attributes); 1993 attributes);
1994 } 1994 }
1995 1995
1996 // Check for accessor in prototype chain removed here in clone. 1996 // Check for accessor in prototype chain removed here in clone.
1997 if (result->IsNotFound()) { 1997 if (result->IsNotFound()) {
1998 return AddProperty(name, value, attributes); 1998 return AddProperty(name, value, attributes);
1999 } 1999 }
2000 if (!result->IsLoaded()) { 2000 if (!result->IsLoaded()) {
2001 return SetLazyProperty(result, name, value, attributes); 2001 return SetLazyProperty(result, name, value, attributes);
2002 } 2002 }
2003 PropertyDetails details = PropertyDetails(attributes, NORMAL);
2004
2003 // Check of IsReadOnly removed from here in clone. 2005 // Check of IsReadOnly removed from here in clone.
2004 switch (result->type()) { 2006 switch (result->type()) {
2005 case NORMAL: 2007 case NORMAL:
2006 return SetNormalizedProperty(result, value); 2008 return SetNormalizedProperty(name, value, details);
2007 case FIELD: 2009 case FIELD:
2008 return FastPropertyAtPut(result->GetFieldIndex(), value); 2010 return FastPropertyAtPut(result->GetFieldIndex(), value);
2009 case MAP_TRANSITION: 2011 case MAP_TRANSITION:
2010 if (attributes == result->GetAttributes()) { 2012 if (attributes == result->GetAttributes()) {
2011 // Only use map transition if the attributes match. 2013 // Only use map transition if the attributes match.
2012 return AddFastPropertyUsingMap(result->GetTransitionMap(), 2014 return AddFastPropertyUsingMap(result->GetTransitionMap(),
2013 name, 2015 name,
2014 value); 2016 value);
2015 } 2017 }
2016 return ConvertDescriptorToField(name, value, attributes); 2018 return ConvertDescriptorToField(name, value, attributes);
(...skipping 6369 matching lines...) Expand 10 before | Expand all | Expand 10 after
8386 if (break_point_objects()->IsUndefined()) return 0; 8388 if (break_point_objects()->IsUndefined()) return 0;
8387 // Single beak point. 8389 // Single beak point.
8388 if (!break_point_objects()->IsFixedArray()) return 1; 8390 if (!break_point_objects()->IsFixedArray()) return 1;
8389 // Multiple break points. 8391 // Multiple break points.
8390 return FixedArray::cast(break_point_objects())->length(); 8392 return FixedArray::cast(break_point_objects())->length();
8391 } 8393 }
8392 #endif 8394 #endif
8393 8395
8394 8396
8395 } } // namespace v8::internal 8397 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698