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

Unified Diff: src/runtime.js

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 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 | « src/property.cc ('k') | src/v8globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index 77b97aed837d654f8f8a3fda74cce5393674c25b..66e1661b759cc6ed66888d0f69d5cee4f9e3b6f6 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -647,3 +647,20 @@ function DefaultString(x) {
// that is cloned when running the code. It is essential that the
// boilerplate gets the right prototype.
%FunctionSetPrototype($Array, new $Array(0));
+
+
+/* ------------------------------------------
+- - - H a r m o n y P r o x i e s - - -
+---------------------------------------------
+*/
+
+function DERIVED_GET_TRAP(receiver, name) {
+ var desc = this.getPropertyDescriptor(name);
+ if (IS_UNDEFINED(desc)) { return desc; }
+ if ('value' in desc) {
+ return desc.value;
+ } else {
+ if (IS_UNDEFINED(desc.get)) { return desc.get; }
+ return desc.get().call(receiver); // The proposal says so...
+ }
+}
« no previous file with comments | « src/property.cc ('k') | src/v8globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698