noticed while working on bug 689615. there are two parts to it: 1) errors thrown in setTimeout code aren't propagated to Worker.onError callback 2) Error instances can't transfer through a pipe because of JSONification the second is confusing, and it shows up in several places, like bug 902965, comment 5 (console logging also goes through a JSON+pipe). why do pipe messages between content and addon context even go through JSON? it can't be for security (sandbox/compartments take care of that?), nor asynchronicity (pipes take care of that?), as evidenced by: https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/content/worker.js#L369 which gets the access to the actual Error instance directly (or maybe cross-compartment wrapped, but not JSONified).
Created attachment 830342 [details] [review] link to PR 1285
Attachment #830342 - Flags: review?(jsantell)
Attachment #830342 - Flags: review?(jsantell) → review+
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/6619a0e4d4b9c1c0a3312551b274ad5dbf0e8825 Merge pull request #1285 from zombie/936962-async-onError fix bug 936962 - propagate async Errors in content-scripts, r=@jsantell
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.