You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2019/11/01 03:19:43 UTC

[royale-asjs] 05/05: remove warnings for instanceof operator, and also fixed illogical comparison to undefined for typeof.

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

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

commit a4d34bbf4c28312e67d9673c63ba18fe59203bdd
Author: greg-dove <gr...@gmail.com>
AuthorDate: Fri Nov 1 16:19:10 2019 +1300

    remove warnings for instanceof operator, and also fixed illogical comparison to undefined for typeof.
---
 frameworks/projects/MXRoyale/pom.xml                        | 13 ++++++++++++-
 .../MXRoyale/src/main/royale/mx/net/SharedObject.as         |  2 +-
 .../MXRoyale/src/main/royale/mx/net/SharedObjectJSON.as     |  2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/frameworks/projects/MXRoyale/pom.xml b/frameworks/projects/MXRoyale/pom.xml
index c704e7f..011f565 100644
--- a/frameworks/projects/MXRoyale/pom.xml
+++ b/frameworks/projects/MXRoyale/pom.xml
@@ -73,7 +73,18 @@
               </define>
           </defines>
           <allowSubclassOverrides>true</allowSubclassOverrides>
-          <additionalCompilerOptions>${project.compiler.options};-js-compiler-define=COMPILE::JS,true;-js-compiler-define=COMPILE::SWF,false;-js-compiler-define=GOOG::DEBUG,goog.DEBUG;-js-compiler-define=ROYALE::DISPLAYOBJECT,IUIComponent;-js-compiler-define=ROYALE::PROXYVISIBILITY,public;-namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.xml;-compiler.js-namespaces.namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.xml [...]
+          <additionalCompilerOptions>
+              ${project.compiler.options};
+              -js-compiler-define=COMPILE::JS,true;
+              -js-compiler-define=COMPILE::SWF,false;
+              -js-compiler-define=GOOG::DEBUG,goog.DEBUG;
+              -js-compiler-define=ROYALE::DISPLAYOBJECT,IUIComponent;
+              -js-compiler-define=ROYALE::PROXYVISIBILITY,public;
+              -namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.xml;
+              -compiler.js-namespaces.namespace+=http://ns.adobe.com/mxml/2009,${project.basedir}/../../mxml-2009-manifest.xml;
+              -compiler.js-namespaces.namespace+=library://ns.apache.org/royale/mx,${project.basedir}/src/main/resources/mx-royale-manifest.xml;
+              -compiler.warn-instance-of-changes=false;
+          </additionalCompilerOptions>
         </configuration>
       </plugin>
     </plugins>
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObject.as b/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObject.as
index 4630fe0..5bb4569 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObject.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObject.as
@@ -147,7 +147,7 @@ package mx.net
             }
             COMPILE::JS{
                 _ls = window.localStorage;
-                if (!_ls && typeof Storage != undefined) {
+                if (!_ls && typeof Storage != "undefined") {
                     //this gets around an issue with local testing with file:// protocol in IE11
                     var p:String = window.location.pathname.replace(/(^..)(:)/, "$1$$");
                     window.location.href = window.location.protocol + "//127.0.0.1" + p;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObjectJSON.as b/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObjectJSON.as
index e1c9e68..474f68c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObjectJSON.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/net/SharedObjectJSON.as
@@ -159,7 +159,7 @@ package mx.net
             }
             COMPILE::JS{
                 _ls = window.localStorage;
-                if (!_ls && typeof Storage != undefined) {
+                if (!_ls && typeof Storage != "undefined") {
                     //this gets around an issue with local testing with file:// protocol in IE11
                     var p:String = window.location.pathname.replace(/(^..)(:)/, "$1$$");
                     window.location.href = window.location.protocol + "//127.0.0.1" + p;