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

Unified Diff: src/objects.h

Issue 3462005: Fix getOwnPropertyDescriptor() support for index properties. (Closed)
Patch Set: Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 1036a5a6053345c36295d57956c32f8819a5e816..05e80360a59029fdf6f2c21d2b569be435b9f3f6 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1417,7 +1417,26 @@ class JSObject: public HeapObject {
// Tells whether the index'th element is present.
inline bool HasElement(uint32_t index);
bool HasElementWithReceiver(JSObject* receiver, uint32_t index);
- bool HasLocalElement(uint32_t index);
+
+ // Tells whether the index'th element is present and how it is stored.
+ enum LocalElementType {
+ // There is no element with given index.
+ UNDEFINED_ELEMENT,
+
+ // Element with given index is handled by interceptor.
+ INTERCEPTED_ELEMENT,
+
+ // Element with given index is character in string.
+ STRING_CHARACTER_ELEMENT,
+
+ // Element with given index is stored in fast backing store.
+ FAST_ELEMENT,
+
+ // Element with given index is stored in slow backing store.
+ DICTIONARY_ELEMENT
+ };
+
+ LocalElementType HasLocalElement(uint32_t index);
bool HasElementWithInterceptor(JSObject* receiver, uint32_t index);
bool HasElementPostInterceptor(JSObject* receiver, uint32_t index);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698