[Greasemonkey] XPCNativeWrappers and Deer Park compatibility

Mark Pilgrim pilgrim at gmail.com
Thu Jul 28 01:05:24 EDT 2005


On 7/27/05, Lenny Domnitser <ldrhcp at gmail.com> wrote:
> Is there any way for Greasemonkey to automatically unwrap any
> wrappedJSObject coming out of the safe window?

That defeats the entire purpose of the wrapping --
someSafeWrapper.wrappedJSObject is just the (unsafe) object that was
being wrapped in the first place.  You're vulnerable to remote scripts
stealing source code, redefining methods and generally messing with
you.  You may as well start off with unsafeWindow.document.something
and be done with it.

XPCNativeWrappers *are for your own protection*.  Yes, they are
difficult to understand.  Yes, we are still figuring out the specifics
of how their limitations bite us.  Yes, they raise the bar on getting
started with Greasemonkey scripting.  Yes, they will be a frequent
source of frustration for newbies, and those newbies will forever
pester us on this list (at best) or give up (at worst).  They are
still worth the hassle.

I guarantee that no one on this list is being hit harder by this than
I am.  I have a book manuscript filled with 90 potentially broken
scripts, half of which I didn't write, and 10 days to test and fix
them all.  The first 10 scripts took me 3 days.  You do the math.  And
given everything I understand about the problem, I still strongly
support this solution.

-- 
Cheers,
-Mark


More information about the Greasemonkey mailing list