This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 739d7db2b MXMLClassDirectiveProcessor: Fixed operand stack underflow
error when using data binding in MXML to assign to <fx:Object> property.
739d7db2b is described below
commit 739d7db2bf47095ae4626d821636df195c6bddf1
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Jul 13 15:57:56 2026 -0700
MXMLClassDirectiveProcessor: Fixed operand stack underflow error when using
data binding in MXML to assign to <fx:Object> property.
---
RELEASE_NOTES.md | 1 +
.../as/codegen/MXMLClassDirectiveProcessor.java | 23 +++++++++++++---------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 86a59957c..5ba236392 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -90,6 +90,7 @@ Apache Royale Compiler 1.0.0
- compiler: Fixed missing symbols specified with `-includes` compiler option
in generated JS.
- compiler: Fixed missing "Generated byte code contains an operand stack
underflow" error when warnings are reported without other errors.
- compiler: Fixed null exception when emitting embedded plain text to JS.
+- compiler: Fixed operand stack underflow error when using data binding in
MXML to assign to `<fx:Object>` property.
- debugger: Added missing isolate ID to SWF load and unload events.
- debugger: Fixed debugger targeting the current JDK version instead of the
intended minimum JDK version.
- debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
index 5bd0fb018..01ded529b 100644
---
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
+++
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/MXMLClassDirectiveProcessor.java
@@ -4040,15 +4040,20 @@ public class MXMLClassDirectiveProcessor extends
ClassDirectiveProcessor
if (propertyNode.getParent().getNodeID() == ASTNodeID.MXMLObjectID)
{
- // TODO This case presuambly also needs
- // some logic involving isDb.
-
- // Push the property name.
- context.addInstruction(OP_pushstring, propertyName);
-
- // Push the property value.
- // Do this by codegen'ing sole child, which is an
IMXMLInstanceNode.
- traverse(propertyNode, context);
+ if (!isDb)
+ {
+ // Push the property name.
+ context.addInstruction(OP_pushstring, propertyName);
+
+ // Push the property value.
+ // Do this by codegen'ing sole child, which is an
IMXMLInstanceNode.
+ traverse(propertyNode, context);
+ }
+ else
+ {
+ context.addInstruction(OP_pushstring, propertyName);
+ context.addInstruction(OP_pushnull);
+ }
}
else
{