[Flashblock] Re: Flashblock revised XBL

Lorenzo Colitti lorenzo at colitti.com
Tue Jan 3 14:58:53 EST 2006


gary liquid wrote:
> So, starting again from scratch, I decided to do some digging.  
> Reobtained the clean XPI from mozilla updates and started running 
> through my test cases.
> Almost all showed flash on my system.

[CCing the mailing list so that the other devs know what's going on]

Hi Gary,

is there any chance we could look at these testcases to understand 
what's going on?

> Ok, we both know about the Bad NP error that gets raised.
> Its raised in the flashblockShowPlaceholder() function:
> 
> if("src" in current && current.src == current.ownerDocument.location) {
> 
> We can't directly tell which section is raising the error so I broke it 
> into seperate lines and its the "src" in current expression.
> 
> Removing this test and running everything through the else statements 
> correctly blocks the flash without the NP error.

So simply doing:

if("src" in current) { ... }

in flashblockShowPlaceholder() causes an error, right?

> I have modified the XML and the bad NP error does not occur, list of 
> changes below:

Any chance you could give us a diff file containing the differences 
between the two versions? You could do this by using the "diff" program 
on Linux (diff -u file1 file2) or a Windows equivalent (don't know what 
you could use). That makes it much easier to understand what you have 
changed and how the modifications you suggest fit in to the existing code.

> var currentsrc = this.src;
> [...]
>     if(currentsrc == document.location)

Hmm, so if I understand correctly you're saying that if you do:

if(this.src == document.location) {
	// Iframe / standalone Flash
} else {
	// Normal (plugin) Flash
}

at the beginning instead of checking current.src in 
flashblockShowPlaceholder() then a number of Flash objects that slip 
through using Flashblock 1.5 are blocked correctly. Correct?

Again, being able to look at (possibly minimized) testcases would be 
invaluable. Let me know if you can provide something. :)


Cheers,
Lorenzo

-- 
Lorenzo Colitti                          http://www.colitti.com/lorenzo/


More information about the Flashblock mailing list