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

commit 843cc45b82e07e7990e0648604ec6e2ad5a58186
Author: Josh Tynjala <[email protected]>
AuthorDate: Wed Oct 9 13:17:59 2024 -0700

    MXRoyaleBase: fix AsyncErrorEvent pasing wrong value to super() constructor 
on SWF
    
    super() constructor expected an Error object, but we were passing the error 
id as an int. Instead, construct a new Error object from the id and text.
---
 .../projects/MXRoyaleBase/src/main/royale/mx/events/AsyncErrorEvent.as | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/events/AsyncErrorEvent.as 
b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/events/AsyncErrorEvent.as
index f44c29a519..9649b538da 100644
--- 
a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/events/AsyncErrorEvent.as
+++ 
b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/events/AsyncErrorEvent.as
@@ -43,7 +43,8 @@ public class AsyncErrorEvent extends 
flash.events.AsyncErrorEvent
                                                          cancelable:Boolean = 
false, text:String = "", id:int = 0
                                                          )
        {
-               super(type, bubbles, cancelable,text,id);
+               // SWF expects an Error object, so create one from our 
parameters
+               super(type, bubbles, cancelable, text, new Error(text, id));
        }
 }
 

Reply via email to