content-policy: do not auto-load the content-policy component
commitc8cb3c645ca85bba3d0a288a7858947a6693ebef
authorJohn Foerch <jjfoerch@earthlink.net>
Sun, 6 Nov 2011 17:59:57 +0000 (6 12:59 -0500)
committerJohn Foerch <jjfoerch@earthlink.net>
Sun, 6 Nov 2011 18:06:54 +0000 (6 13:06 -0500)
tree39025fcb678e3ddc2603382159242f44cb1e5ff1
parent238d3e8b846e29ffd0ff3d39708cf6621ab3f6bc
content-policy: do not auto-load the content-policy component

Have the content-policy module load the content-policy component.  This
should resolve a sporadically occurring bug whereby the program would fail
to start with the error, "get_caller_source_code_reference is not defined"
in recent version of XULRunner (7 and 8 for certain).  The stack trace
points back to the content-policy component's use of add_hook, and since
source-code.js is loaded after hook.js, it suggests that the problem was a
race condition due to asynchronous loading of components.

See http://bugs.conkeror.org/issue376

This patch also has the beneficial effect that the content-policy
component will only be loaded for people who use it.
chrome.manifest
components/content-policy.js
content-policy.manifest [new file with mode: 0644]
modules/content-policy.js