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

Unified Diff: src/objects-inl.h

Issue 11365111: Object.observe: generate change records for indexed properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 37d0ab7983dd97c3319f3c9ca59b310e6ef16f13..67949d8aced3dd2adf7ea9dde2295c0bbd433c23 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5084,6 +5084,11 @@ PropertyAttributes JSReceiver::GetPropertyAttribute(String* key) {
}
+PropertyAttributes JSReceiver::GetElementAttribute(uint32_t index) {
+ return GetElementAttributeWithReceiver(this, index);
+}
+
+
// TODO(504): this may be useful in other places too where JSGlobalProxy
// is used.
Object* JSObject::BypassGlobalProxy() {
@@ -5112,6 +5117,22 @@ bool JSReceiver::HasElement(uint32_t index) {
}
+bool JSReceiver::HasLocalElement(uint32_t index) {
+ if (IsJSProxy()) {
+ return JSProxy::cast(this)->HasElementWithHandler(index);
+ }
+ return JSObject::cast(this)->HasLocalElement(index);
+}
+
+
+PropertyAttributes JSReceiver::GetLocalElementAttribute(uint32_t index) {
+ if (IsJSProxy()) {
+ return JSProxy::cast(this)->GetElementAttributeWithHandler(this, index);
+ }
+ return JSObject::cast(this)->GetLocalElementAttribute(index);
+}
+
+
bool AccessorInfo::all_can_read() {
return BooleanBit::get(flag(), kAllCanReadBit);
}
« src/objects.cc ('K') | « src/objects.cc ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698