Closed Bug 936962 Opened 11 years ago Closed 11 years ago

async Errors thrown from setTimeout code in content-scripts get lost

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: zombie, Assigned: zombie)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
jsantell
: review+
Details | Review
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).
Attached file link to PR 1285
Attachment #830342 - Flags: review?(jsantell)
Assignee: nobody → tomica+amo
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
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: