The cause of this error showing up in the console in Webkit browsers is well-known and described clearly in the error text:
Unsafe JavaScript attempt to access frame with URL iframed-content-example.com from frame with URL www.example.com. Domains, protocols and ports must match.
But for large sites with many possible pieces of code triggering the error (ads, third-party libraries, site-specific scripts), the error message is not too helpful for tracking down and debugging the line of code that generated the issue. Is there any way to trigger a stack trace when the cross-domain error occurs?