Chromium Code Reviews| Index: src/elements.h |
| diff --git a/src/elements.h b/src/elements.h |
| index 851c8c3d97f89d7aab4f0e910ead6c4780b18b5e..95b79d917017d5bb54e0c0ef36f4fe16410c6aac 100644 |
| --- a/src/elements.h |
| +++ b/src/elements.h |
| @@ -44,6 +44,11 @@ class ElementsAccessor { |
| JSObject* holder, |
| Object* receiver) = 0; |
| + virtual MaybeObject* Set(JSObject* holder, |
| + uint32_t key, |
| + Object* value, |
| + PropertyAttributes attributes = ABSENT) = 0; |
| + |
| virtual MaybeObject* Delete(JSObject* holder, |
| uint32_t key, |
| JSReceiver::DeleteMode mode) = 0; |
| @@ -84,6 +89,14 @@ class ElementsAccessor { |
| virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store, |
| uint32_t index) = 0; |
| + // Internal element setter which does not update the objects backing store |
| + // containing the elements, but returns the new backing store. The caller |
| + // is responsible for updating the object reference to the backing store. |
|
danno
2011/10/24 21:09:02
The separation of responsibility seems clear in th
|
| + virtual MaybeObject* SetInternal(FixedArrayBase* backing_store, |
| + uint32_t index, |
| + Object* value, |
| + PropertyAttributes attributes) = 0; |
| + |
| private: |
| static ElementsAccessor** elements_accessors_; |