flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [41/55] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - fix constant binding in release mode
Date Thu, 17 Dec 2015 07:54:51 GMT
fix constant binding in release mode


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/40535515
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/40535515
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/40535515

Branch: refs/heads/develop
Commit: 405355157514f3882794855aa3261846e8d6fbf6
Parents: 3f77eec
Author: Alex Harui <aharui@apache.org>
Authored: Tue Dec 15 15:13:56 2015 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Dec 15 15:13:56 2015 -0800

----------------------------------------------------------------------
 .../org/apache/flex/binding/ConstantBinding.as  | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/40535515/frameworks/projects/Binding/as/src/org/apache/flex/binding/ConstantBinding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Binding/as/src/org/apache/flex/binding/ConstantBinding.as
b/frameworks/projects/Binding/as/src/org/apache/flex/binding/ConstantBinding.as
index 0a2ae83..050489a 100644
--- a/frameworks/projects/Binding/as/src/org/apache/flex/binding/ConstantBinding.as
+++ b/frameworks/projects/Binding/as/src/org/apache/flex/binding/ConstantBinding.as
@@ -154,6 +154,28 @@ package org.apache.flex.binding
                 {
                 }
             }
+            else 
+            {
+                COMPILE::JS
+                {
+                    // GCC optimizer only puts exported class constants on
+                    // Window and not on the class itself (which got renamed)
+                    var cname:Object = source.FLEXJS_CLASS_INFO;
+                    if (cname) 
+                    {
+                        cname = cname.names[0].qName;
+                        var parts:Array = cname.split('.');
+                        var n:int = parts.length;
+                        var o:Object = window;
+                        for (var i:int = 0; i < n; i++) {
+                            o = o[parts[i]];
+                        }
+                        val = o[sourcePropertyName];
+                        destination[destinationPropertyName] = val;
+                    }                    
+                }
+            }
+
 		}
 		
         /**


Mime
View raw message