Open Bug 1083318 Opened 10 years ago Updated 2 years ago

PromiseWorker.js double wrapping on throw

Categories

(Toolkit :: Async Tooling, defect)

33 Branch
x86_64
Windows 8.1
defect

Tracking

()

UNCONFIRMED

People

(Reporter: noitidart, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 Build ID: 20141007073543 Steps to reproduce: I used PromiseWorker.jsm and PromiseWorker.js This example is for Windows. The function creates a MsgBox. If you click "yes" then the promise is resolved. If you click "no" then the promise is rejected by `throw new Error('reject promise')`. And the aReason is logged. We see when rejected this is logged: http://i.imgur.com/07TRgGG.png See the Error: Error: Seems double wrapped. But we can read aReason.message, that object isnt double wrapped. I'm not sure if this is a bug or not. Line where i reject: https://github.com/Noitidart/PromiseWorker/blob/master/myWorker.js#L39 Line where i log: https://github.com/Noitidart/PromiseWorker/blob/master/bootstrap.js#L38 Actual results: Test case is here: https://github.com/Noitidart/PromiseWorker To reproduce download addon GitHub Extension Installer: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/ Then install addon from repo above.
Component: Untriaged → Async Tooling
Product: Firefox → Toolkit
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.