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

Side by Side Diff: src/objects.h

Issue 6712059: Follow jsc on not throwing when trying to add a property to a non-extensible object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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/objects.cc » ('j') | test/mjsunit/strict-mode.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 PropertyAttributes attributes); 1684 PropertyAttributes attributes);
1685 1685
1686 // Add a property to a slow-case object. 1686 // Add a property to a slow-case object.
1687 MUST_USE_RESULT MaybeObject* AddSlowProperty(String* name, 1687 MUST_USE_RESULT MaybeObject* AddSlowProperty(String* name,
1688 Object* value, 1688 Object* value,
1689 PropertyAttributes attributes); 1689 PropertyAttributes attributes);
1690 1690
1691 // Add a property to an object. 1691 // Add a property to an object.
1692 MUST_USE_RESULT MaybeObject* AddProperty(String* name, 1692 MUST_USE_RESULT MaybeObject* AddProperty(String* name,
1693 Object* value, 1693 Object* value,
1694 PropertyAttributes attributes); 1694 PropertyAttributes attributes,
1695 StrictModeFlag strict_mode);
1695 1696
1696 // Convert the object to use the canonical dictionary 1697 // Convert the object to use the canonical dictionary
1697 // representation. If the object is expected to have additional properties 1698 // representation. If the object is expected to have additional properties
1698 // added this number can be indicated to have the backing store allocated to 1699 // added this number can be indicated to have the backing store allocated to
1699 // an initial capacity for holding these properties. 1700 // an initial capacity for holding these properties.
1700 MUST_USE_RESULT MaybeObject* NormalizeProperties( 1701 MUST_USE_RESULT MaybeObject* NormalizeProperties(
1701 PropertyNormalizationMode mode, 1702 PropertyNormalizationMode mode,
1702 int expected_additional_properties); 1703 int expected_additional_properties);
1703 MUST_USE_RESULT MaybeObject* NormalizeElements(); 1704 MUST_USE_RESULT MaybeObject* NormalizeElements();
1704 1705
(...skipping 4912 matching lines...) Expand 10 before | Expand all | Expand 10 after
6617 } else { 6618 } else {
6618 value &= ~(1 << bit_position); 6619 value &= ~(1 << bit_position);
6619 } 6620 }
6620 return value; 6621 return value;
6621 } 6622 }
6622 }; 6623 };
6623 6624
6624 } } // namespace v8::internal 6625 } } // namespace v8::internal
6625 6626
6626 #endif // V8_OBJECTS_H_ 6627 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | test/mjsunit/strict-mode.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698