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-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 0dfd792ccf TypeDefinition: fix exception if
interface.prototype.ROYALE_CLASS_INFO doesn't exist
0dfd792ccf is described below
commit 0dfd792ccfe931ec4f39d17f4036d74fcf99167a
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Aug 5 11:51:45 2026 -0700
TypeDefinition: fix exception if interface.prototype.ROYALE_CLASS_INFO
doesn't exist
If externs defines an interface, ROYALE_CLASS_INFO may not exist. There are
other similar checks for superclasses, so this just handles the same case for
interfaces.
---
.../src/main/royale/org/apache/royale/reflection/TypeDefinition.as | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
index f53d5cde8d..51067b4b6c 100755
---
a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
+++
b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/TypeDefinition.as
@@ -428,7 +428,9 @@ COMPILE::SWF {
if ((_kind || kind) == "interface") {
//collect.length can expand during the loop below
for (i = 0; i < collect.length; i++) {
- collect.push.apply(collect,
(collect[i].prototype.ROYALE_CLASS_INFO.interfaces || []));
+ data = collect[i].prototype.ROYALE_CLASS_INFO;
+ if (!data) continue;
+ collect.push.apply(collect, (data.interfaces ||
[]));
}
} else {
var superClass:Object = def.superClass_;
@@ -449,7 +451,8 @@ COMPILE::SWF {
for (i=0;i<n;i++) {
var iface:Object = collect[i];
data = iface.prototype.ROYALE_CLASS_INFO;
- results[i] =
TypeDefinition.getDefinition(data.names[0].qName,data);
+ if (!data) continue;
+
results.push(TypeDefinition.getDefinition(data.names[0].qName,data));
}
}
}