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

Unified Diff: src/property.h

Issue 11554019: Object.observe: Make array length and other magic data properties work correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « src/objects.cc ('k') | src/v8natives.js » ('j') | src/v8natives.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index c41c6dc816727db4dee43fab4638656891adcbe1..168b80a11a86c9cd397eadaf29321ad4d083fb5c 100644
--- a/src/property.h
+++ b/src/property.h
@@ -310,6 +310,19 @@ class LookupResult BASE_EMBEDDED {
return IsFound() && !IsTransition();
}
+ bool IsDataProperty() {
+ switch (type()) {
+ case FIELD:
+ case NORMAL:
+ case CONSTANT_FUNCTION:
+ return true;
+ case CALLBACKS:
+ return GetCallbackObject()->IsForeign();
Michael Starzinger 2012/12/12 15:34:05 I think AccessorInfo callbacks should also return
rossberg 2012/12/12 15:41:10 Done.
+ default:
Michael Starzinger 2012/12/12 15:34:05 I think Sven has to say something about this defau
rossberg 2012/12/12 15:41:10 Unfolded default (also in GetLazyValue below).
+ return false;
+ }
+ }
+
bool IsCacheable() { return cacheable_; }
void DisallowCaching() { cacheable_ = false; }
« no previous file with comments | « src/objects.cc ('k') | src/v8natives.js » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698