We've removed XPCSafeJSObjectWrapper, but it's still used in nsProxyAutoConfig.js, which possibly causes problems; see bug 646509 comment 18. The lack of a test added in bug 646509 probably didn't help... Jeff, Peter, Blake, do any of you know how we can test it, at least manually, to make sure the fix of removing the XCPSafeJSObjectWrapper is correct?
Maybe you can add a test to netwerk/test/unit/test_protocolproxyservice.js for this, somehow. I would have to figure out details of how to do so from scratch, tho, but I'm guessing it's probably possible, if you can get enough feedback detail to verify the nature of the resulting error.
For what it's worth, at that point, we're already throwing an exception. So while it's likely that this bug is making it more difficult for developers to debug their PAC files, there's already an exception being thrown, so something's already broken.
769764 removes xpcsafejsobjectwrapper from the pac code
fixed by 769764 https://hg.mozilla.org/mozilla-central/rev/828f91de7143