[Flashblock] "this.block is not a function" errors and segfaults
Lorenzo Colitti
lorenzo at colitti.com
Thu Nov 24 01:04:05 EST 2005
Hi all,
I've been trying to figure out what is causing these errors in the
refactored XBL, and it appears that when this.block("flash") is called
this.block is undefined. I thought that it might be a race condition and
that waiting might help.
However, when I made the following change:
> --- content/flashblock/flashblock.xml 22 Nov 2005 16:03:30 -0000 1.8.2.3
> +++ content/flashblock/flashblock.xml 23 Nov 2005 23:44:21 -0000
> @@ -158,6 +158,9 @@
> <binding id="flash" extends="#flashblock">
> <implementation>
> <constructor>
> +while(this.block == undefined) {
> +alert(this.block);
> +} ;
> this.block("flash");
> </constructor>
> </implementation>
I got normal behaviour 90% of the time, and an infinite loop of
"undefined" javascripts alert about 10% of the time. This suggests that
waiting will not help.
I don't understand how block() can be undefined if the binding inherits
it... is this a bug in gecko?
I tried to removing the timeout and it doesn't seem to enter the
infinite loop at all, but about 10% of the time firefox segfaults when
stressed with the testcases.
Looks like it won't be easy to clean up this code after all :(
Cheers,
Lorenzo
--
Lorenzo Colitti http://www.colitti.com/lorenzo/
More information about the Flashblock
mailing list