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 bad67edd4 SwfLoadedEvent, SwfUnloadedEvent: added isolateId field
bad67edd4 is described below
commit bad67edd42b6dc938f01fe7e4f3a369c12ba904d
Author: Josh Tynjala <[email protected]>
AuthorDate: Fri Feb 21 14:44:00 2025 -0800
SwfLoadedEvent, SwfUnloadedEvent: added isolateId field
Clients need to know whether it's from a worker or not because the index
field must be used with the correct session (workers have separate
IsolateSessions)
---
.../src/main/java/flash/tools/debugger/concrete/DManager.java | 4 ++--
.../main/java/flash/tools/debugger/events/SwfLoadedEvent.java | 11 +++++++++++
.../java/flash/tools/debugger/events/SwfUnloadedEvent.java | 11 +++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/debugger/src/main/java/flash/tools/debugger/concrete/DManager.java
b/debugger/src/main/java/flash/tools/debugger/concrete/DManager.java
index 31da288b1..39c1ee467 100644
--- a/debugger/src/main/java/flash/tools/debugger/concrete/DManager.java
+++ b/debugger/src/main/java/flash/tools/debugger/concrete/DManager.java
@@ -1839,7 +1839,7 @@ public class DManager implements DProtocolNotifierIF,
SourceLocator {
// notify if its newly created
if (justCreated)
addEvent(new SwfLoadedEvent(id,
(int) index, path, url,
- host, port,
swfSize));
+ host, port,
swfSize, targetIsolate));
} else {
// note our state before marking it
boolean alreadyUnloaded =
info.isUnloaded();
@@ -1850,7 +1850,7 @@ public class DManager implements DProtocolNotifierIF,
SourceLocator {
// notify if this information is new.
if (!alreadyUnloaded)
addEvent(new
SwfUnloadedEvent(info.getId(),
- info.getPath(),
(int) index));
+ info.getPath(),
(int) index, targetIsolate));
}
// System.out.println("[SWFLOAD] Loaded
"+path+", size="+swfSize+", scripts="+scriptCount);
}
diff --git
a/debugger/src/main/java/flash/tools/debugger/events/SwfLoadedEvent.java
b/debugger/src/main/java/flash/tools/debugger/events/SwfLoadedEvent.java
index 0245d938d..f0165fbe6 100644
--- a/debugger/src/main/java/flash/tools/debugger/events/SwfLoadedEvent.java
+++ b/debugger/src/main/java/flash/tools/debugger/events/SwfLoadedEvent.java
@@ -17,6 +17,8 @@
package flash.tools.debugger.events;
+import flash.tools.debugger.Isolate;
+
/**
* This event is fired when the player has completed the loading of
* the specified SWF.
@@ -44,7 +46,15 @@ public class SwfLoadedEvent extends DebugEvent
/** name of host in which the SWF was loaded */
public String host;
+ /** the isolate identifier where the SWF was unloaded */
+ public int isolateId;
+
public SwfLoadedEvent(long sId, int sIndex, String sPath, String sUrl,
String sHost, long sPort, long sSwfSize)
+ {
+ this(sId, sIndex, sPath, sUrl, sHost, sPort, sSwfSize,
Isolate.DEFAULT_ID);
+ }
+
+ public SwfLoadedEvent(long sId, int sIndex, String sPath, String sUrl,
String sHost, long sPort, long sSwfSize, int sIsolateId)
{
id = sId;
index = sIndex;
@@ -53,5 +63,6 @@ public class SwfLoadedEvent extends DebugEvent
path = sPath;
url = sUrl;
host = sHost;
+ isolateId = sIsolateId;
}
}
diff --git
a/debugger/src/main/java/flash/tools/debugger/events/SwfUnloadedEvent.java
b/debugger/src/main/java/flash/tools/debugger/events/SwfUnloadedEvent.java
index b91e941e1..2f482af24 100644
--- a/debugger/src/main/java/flash/tools/debugger/events/SwfUnloadedEvent.java
+++ b/debugger/src/main/java/flash/tools/debugger/events/SwfUnloadedEvent.java
@@ -17,6 +17,8 @@
package flash.tools.debugger.events;
+import flash.tools.debugger.Isolate;
+
/**
* This event is fired when the player has unloaded a swf
*/
@@ -31,10 +33,19 @@ public class SwfUnloadedEvent extends DebugEvent
/** full path name for the SWF */
public String path;
+ /** the isolate identifier where the SWF was unloaded */
+ public int isolateId;
+
public SwfUnloadedEvent(long sId, String sPath, int sIndex)
+ {
+ this(sId, sPath, sIndex, Isolate.DEFAULT_ID);
+ }
+
+ public SwfUnloadedEvent(long sId, String sPath, int sIndex, int
sIsolateId)
{
id = sId;
index = sIndex;
path = sPath;
+ isolateId = sIsolateId;
}
}