You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/04/09 01:05:45 UTC
[26/47] git commit: [flex-asjs] [refs/heads/develop] - need to keep
looking up ancestor chain for superSetter or superGetter
need to keep looking up ancestor chain for superSetter or superGetter
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/cac36ed6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/cac36ed6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/cac36ed6
Branch: refs/heads/develop
Commit: cac36ed6a10e259dd20a82b5beaf2e675b475de0
Parents: ef847bf
Author: Alex Harui <ah...@apache.org>
Authored: Fri Apr 3 16:02:23 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Apr 3 16:02:23 2015 -0700
----------------------------------------------------------------------
.../js/FlexJS/src/org/apache/flex/utils/Language.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/cac36ed6/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
index ccbcace..3fdb371 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/utils/Language.js
@@ -259,7 +259,13 @@ org_apache_flex_utils_Language.postdecrement = function(obj, prop) {
* @return {Object}
*/
org_apache_flex_utils_Language.superGetter = function(clazz, pthis, prop) {
- var superdesc = Object.getOwnPropertyDescriptor(clazz.superClass_, prop);
+ var superClass = clazz.superClass_;
+ var superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ while (superdesc == null)
+ {
+ superClass = superClass.constructor.superClass_;
+ superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ }
return superdesc.get.call(pthis);
};
@@ -274,6 +280,12 @@ org_apache_flex_utils_Language.superGetter = function(clazz, pthis, prop) {
* @param {Object} value The value.
*/
org_apache_flex_utils_Language.superSetter = function(clazz, pthis, prop, value) {
- var superdesc = Object.getOwnPropertyDescriptor(clazz.superClass_, prop);
+ var superClass = clazz.superClass_;
+ var superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ while (superdesc == null)
+ {
+ superClass = superClass.constructor.superClass_;
+ superdesc = Object.getOwnPropertyDescriptor(superClass, prop);
+ }
superdesc.set.apply(pthis, [value]);
};