Daniel Grace wrote:
[snip]
> I'm connecting to a custom message bus using an XMLSocket. When the
> remote end closes the connection (when we have to restart the message
> bus, as it's also beta quality) the Flash 8 plugin calls my onClose
> handler. The flash 9 plugin however brings down the entire browser.
> Backtraces have a call to EnforceLocalSecurity in common.
>
> Has anyone seen this? Does anyone have a workaround or further question
> to help me track this down? I haven't seen anything in the results of a
> google query and I have confirmed this behavior in the latest Flash
> plugin (at least for the Mac).
>   
[snip]

I have found the solution, and wanted to put this in the archives for
anyone else. Here is the code that was causing the crash:

private function onClose(): Void {
...
this.connect();
}

In the Flash 8 plugin, this would gladly do what I wanted it to:
immediately try to reconnect. Note that this wasn't causing an infinite
loop, as this.connect() was smarter than that and would back off.

In Flash 9 (and according to one report, Flash 7 sometimes, but not
always) this would cause a crash. This is the fix:

private function onClose(): Void {
...
var p = this;
var q;
q = setInterval(function() { p.connect(); clearInterval(q); }, 10);
}

Apparently a slight delay (or getting out of this thread) and it works
in all versions of the plugin.

Daniel
>
> Daniel
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>   

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to