You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2014/10/31 17:50:39 UTC

[05/14] git commit: [flex-falcon] [refs/heads/develop] - Various checks for NPE situations not encountered in FlexJS

Various checks for NPE situations not encountered in FlexJS

Signed-off-by: Erik de Bruin <er...@ixsoftware.nl>


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

Branch: refs/heads/develop
Commit: 0734ae475d61b158aea7dab3632444b106ea6e5a
Parents: 5e47b16
Author: Erik de Bruin <er...@ixsoftware.nl>
Authored: Fri Oct 31 17:35:09 2014 +0100
Committer: Erik de Bruin <er...@ixsoftware.nl>
Committed: Fri Oct 31 17:44:03 2014 +0100

----------------------------------------------------------------------
 .../compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0734ae47/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
index 5947783..1ff495c 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/js/vf2js/JSVF2JSEmitter.java
@@ -678,6 +678,9 @@ public class JSVF2JSEmitter extends JSGoogEmitter implements IJSVF2JSEmitter
                             && ((FunctionDefinition) nodeDef)
                                     .getFunctionClassification() == IFunctionDefinition.FunctionClassification.LOCAL;
 
+                    if (nodeDef instanceof IParameterDefinition)
+                    	return false;
+                    
                     return !identifierIsLocalFunction;
                 }
             }
@@ -743,7 +746,7 @@ public class JSVF2JSEmitter extends JSGoogEmitter implements IJSVF2JSEmitter
         boolean emitName = true;
 
         if (nodeDef != null
-                && nodeDef.isStatic())
+                && nodeDef.isStatic() && nodeDef.getParent() != null)
         {
             String sname = nodeDef.getParent().getQualifiedName();
             if (sname.length() > 0)
@@ -930,7 +933,6 @@ public class JSVF2JSEmitter extends JSGoogEmitter implements IJSVF2JSEmitter
         IClassNode cnode = (IClassNode) node
                 .getAncestorOfType(IClassNode.class);
 
-        // ToDo (erikdebruin): add VF2JS conditional -> only use check during full SDK compilation
         if (cnode == null)
             return;