You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/12/17 09:21:17 UTC

[royale-asjs] 03/04: prevent renaming of ROYALE_CLASS_INFO

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 7f21b1acd75496699df296a533cf6f6d1d58b84c
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Dec 11 16:11:19 2018 -0800

    prevent renaming of ROYALE_CLASS_INFO
---
 .../MXRoyale/src/main/royale/mx/modules/Module.as  | 17 +++++++++++++++
 .../src/main/royale/mx/modules/ModuleLoader.as     | 24 +++++++++++++++-------
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/Module.as b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/Module.as
index 014e78d..cd844f3 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/Module.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/Module.as
@@ -89,6 +89,23 @@ public class Module extends Container implements IModule //extends LayoutContain
         super();
     }
 	
+    /**
+     * These APIs keep properties in ROYALE_CLASS_INFO from being minified.
+     * When a module is being loaded, both the loading .js file and the loaded
+     * .js file need to have an agreement on which plain object field names
+     * can be minified.  If you run into other issues with plain object renaming
+     * you can add your own getters.
+     */
+    private static function get interfaces():Boolean
+    {
+        return true;
+    }
+    private static function get qName():Boolean
+    {
+        return true;
+    }
+    
+    
     //----------------------------------
     //  layout
     //----------------------------------
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
index 601d6b1..b88a264 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/modules/ModuleLoader.as
@@ -25,13 +25,6 @@ import mx.core.FlexVersion;
 import mx.events.FlexEvent;
 import mx.events.ModuleEvent;
 import mx.system.ApplicationDomain;
-//import flash.display.DisplayObject;
-//import flash.display.DisplayObjectContainer;
-//import flash.events.Event;
-//import flash.system.ApplicationDomain;
-//import flash.system.SecurityDomain;
-//import flash.utils.ByteArray;
-//import mx.core.IDeferredInstantiationUIComponent;
 
 import org.apache.royale.utils.UIModuleUtils;
 
@@ -211,6 +204,23 @@ public class ModuleLoader extends VBox
 
     private var utils:UIModuleUtils = new UIModuleUtils();
     
+    /**
+     * These APIs keep properties in ROYALE_CLASS_INFO from being minified.
+     * When a module is being loaded, both the loading .js file and the loaded
+     * .js file need to have an agreement on which plain object field names
+     * can be minified.  If you run into other issues with plain object renaming
+     * you can add your own getters.
+     */
+    private static function get interfaces():Boolean
+    {
+        return true;
+    }
+    private static function get qName():Boolean
+    {
+        return true;
+    }
+    
+    
     //--------------------------------------------------------------------------
     //
     //  Variables