{"action":"created","issue":{"url":"https://api.github.com/repos/servo/rust-mozjs/issues/164","labels_url":"https://api.github.com/repos/servo/rust-mozjs/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/servo/rust-mozjs/issues/164/comments","events_url":"https://api.github.com/repos/servo/rust-mozjs/issues/164/events","html_url":"https://github.com/servo/rust-mozjs/issues/164","id":92245122,"number":164,"title":"Errors are not being reported","user":{"login":"zofrex","id":22220,"avatar_url":"https://avatars.githubusercontent.com/u/22220?v=3","gravatar_id":"","url":"https://api.github.com/users/zofrex","html_url":"https://github.com/zofrex","followers_url":"https://api.github.com/users/zofrex/followers","following_url":"https://api.github.com/users/zofrex/following{/other_user}","gists_url":"https://api.github.com/users/zofrex/gists{/gist_id}","starred_url":"https://api.github.com/users/zofrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zofrex/subscriptions","organizations_url":"https://api.github.com/users/zofrex/orgs","repos_url":"https://api.github.com/users/zofrex/repos","events_url":"https://api.github.com/users/zofrex/events{/privacy}","received_events_url":"https://api.github.com/users/zofrex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-01T02:11:57Z","updated_at":"2015-07-01T19:05:05Z","closed_at":null,"body":"Out of the box, the registered error reporting function is not being called for me. I've narrowed it down to these two lines in Runtime::new():\r\n\r\n```rust\r\n            (*contextopts).set_dontReportUncaught_(true);\r\n            (*contextopts).set_autoJSAPIOwnsErrorReporting_(true);\r\n```\r\nUnless both of these options are set to false, the error reporting function doesn't get called on error."},"comment":{"url":"https://api.github.com/repos/servo/rust-mozjs/issues/comments/117796884","html_url":"https://github.com/servo/rust-mozjs/issues/164#issuecomment-117796884","issue_url":"https://api.github.com/repos/servo/rust-mozjs/issues/164","id":117796884,"user":{"login":"bholley","id":377435,"avatar_url":"https://avatars.githubusercontent.com/u/377435?v=3","gravatar_id":"","url":"https://api.github.com/users/bholley","html_url":"https://github.com/bholley","followers_url":"https://api.github.com/users/bholley/followers","following_url":"https://api.github.com/users/bholley/following{/other_user}","gists_url":"https://api.github.com/users/bholley/gists{/gist_id}","starred_url":"https://api.github.com/users/bholley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bholley/subscriptions","organizations_url":"https://api.github.com/users/bholley/orgs","repos_url":"https://api.github.com/users/bholley/repos","events_url":"https://api.github.com/users/bholley/events{/privacy}","received_events_url":"https://api.github.com/users/bholley/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T19:05:05Z","updated_at":"2015-07-01T19:05:05Z","body":"Yes. If you want to avoid an error reporting nightmare, Servo should do the following:\r\n1: Set autoJSAPIOwnsErrorReporting and dontReportUncaught everywhere (hopefully on the single JSContext that Servo presumably has).\r\n2: Register a \"WarningOnlyErrorReporter\", that behaves similarly to the one set by AutoJSAPI::TakeOwnershipOfErrorReporting.\r\n3: Implementing an RAII class like AutoJSAPI, which handles errors when it gets popped off the stack."}}