-
Notifications
You must be signed in to change notification settings - Fork 488
Closed
Description
I have flash debug player version installed: 17.0.0.188, testing on IE9.
I get the error of Security violation trying to access "unknown", in ExternalInterface call, in processEvent(). It is hard to reproduce, and I didn't copy exact error. I found the same kind of error posted by someone else:
SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller http://example.com/path/my.swf cannot access <unknown>.
at flash.external::ExternalInterface$/_evalJS()
at flash.external::ExternalInterface$/call()
Here's a suggested patch:
diff --git a/flash-src/src/net/gimite/websocket/WebSocketMain.as b/flash-src/src/net/gimite/websocket/WebSocketMa
index 3daa572..9839984 100644
--- a/flash-src/src/net/gimite/websocket/WebSocketMain.as
+++ b/flash-src/src/net/gimite/websocket/WebSocketMain.as
@@ -150,8 +150,12 @@ public class WebSocketMain extends Sprite implements IWebSocketLogger{
*/
public function processEvents():void {
if (eventQueue.length == 0) return;
- if (!ExternalInterface.call("WebSocket.__onFlashEvent")) {
- setTimeout(processEvents, 500);
+ try {
+ if (!ExternalInterface.call("WebSocket.__onFlashEvent")) {
+ setTimeout(processEvents, 500);
+ }
+ } catch(e:SecurityError){
+ trace("caught SecurityError when trying to processEvents. Not retrying again.");
}
}
Metadata
Metadata
Assignees
Labels
No labels