- From: Joshua Bell <notifications@github.com>
- Date: Tue, 23 Jan 2018 12:28:04 -0800
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/IndexedDB/issues/49/359919718@github.com>
The propagation from workers to window does not appear to behave as described in https://github.com/w3c/IndexedDB/issues/49#issuecomment-237172028 in Firefox 57 for Indexed DB errors. Given a page with a worker that uses IDB that has handlers for the request, transaction, connection, a global onerror handler in the worker, an onerror handler on the Worker object, and an onerror handler on the window global scope, Firefox sees the following when a ConstraintError is triggered: ``` in worker: [object IDBRequest]: error, ConstraintError in worker: [object IDBTransaction]: error, ConstraintError in worker: [object IDBDatabase]: error, ConstraintError worker global onerror: ConstraintError, http://localhost:8888/worker.js, 22, 17, null ``` (i.e. the propagation path is just IDBRequest → IDBTransaction → IDBDatabase ⇒ Worker global) In contrast, for a non-IDB error, e.g. the script ends with `throw Error('oops')`: ``` worker global onerror: Error: oops, http://localhost:8888/worker.js, 33, 0, Error: oops Worker object onerror: [object ErrorEvent], undefined, undefined, undefined, undefined window global onerror: Error: oops, http://localhost:8888/worker.js, 33, 0, null ``` (i.e. the propagation path is Worker global ⇒ Worker object ⇒ Window global) Further, on the worker's global onerror, the first argument passed is the **Error** not the **Event**. That means `preventDefault()` can't be called. @bevis-tseng - can you confirm the above, and if this is intentional? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/IndexedDB/issues/49#issuecomment-359919718
Received on Tuesday, 23 January 2018 20:28:26 UTC