Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Issue 243523003: Fire window.onerror for uncaught IndexedDB errors (Closed)

Created:
6 years, 8 months ago by jsbell
Modified:
5 years, 3 months ago
CC:
alecflett, blink-reviews, dgrogan, ericu+idb_chromium.org, jsbell+idb_chromium.org, pfeldman
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fire window.onerror for uncaught IndexedDB errors Capture the call stack when an IDBRequest is made, and if the request fails with an error, and the error is not prevented, then fire window.onerror (and worker's global onerror). Not part of the Indexed DB "v1" spec, but planned for v2 and already implemented in Firefox. BUG=302010

Patch Set 1 #

Patch Set 2 : Include error name #

Total comments: 5

Patch Set 3 : Rebase with error name in output #

Patch Set 4 : Rebased #

Patch Set 5 : Update testharness-based test to allow onerror #

Total comments: 6

Patch Set 6 : More deliberate use of preventDefault vs. expectError #

Patch Set 7 : Remove FIXMEs #

Total comments: 12

Patch Set 8 : Assert stack capture; Oilpan fixes #

Patch Set 9 : Rebase lineno in test due to js-test.js change #

Patch Set 10 : Disallow empty stack #

Total comments: 1

Patch Set 11 : Add comment #

Total comments: 1

Patch Set 12 : Rebased #

Patch Set 13 : Rebased #

Patch Set 14 : Don't capture full stack unless devtools is visible #

Total comments: 1

Patch Set 15 : Latest iteration #

Patch Set 16 : Rebased and linkage fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -89 lines) Patch
M LayoutTests/resources/js-test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +20 lines, -3 lines 0 comments Download
M LayoutTests/storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/error-causes-abort-by-default-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +7 lines, -3 lines 0 comments Download
M LayoutTests/storage/indexeddb/getdatabasenames-failed-open.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -3 lines 0 comments Download
M LayoutTests/storage/indexeddb/index-multientry-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/lazy-index-population.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +18 lines, -5 lines 0 comments Download
M LayoutTests/storage/indexeddb/lazy-index-population-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +12 lines, -3 lines 0 comments Download
M LayoutTests/storage/indexeddb/request-event-propagation-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/delete-in-upgradeneeded-close-in-versionchange.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +10 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/error-causes-abort-by-default.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +23 lines, -14 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/index-multientry.js View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/intversion-revert-on-abort.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/intversion-upgrades.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/metadata.js View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/objectstore-basics.js View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/odd-strings.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/persistence.js View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/storage/indexeddb/resources/request-continue-abort.js View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M LayoutTests/storage/indexeddb/resources/request-event-propagation.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/transaction-abort.js View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/transaction-basics.js View 1 2 3 4 5 5 chunks +19 lines, -16 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/transaction-error.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +3 lines, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/transaction-event-propagation.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -2 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/unblocked-version-changes.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/version-change-abort.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +40 lines, -18 lines 0 comments Download
M LayoutTests/storage/indexeddb/transaction-error-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -1 line 0 comments Download
M LayoutTests/storage/indexeddb/transaction-event-propagation-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/storage/indexeddb/version-change-abort-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +15 lines, -7 lines 0 comments Download
A LayoutTests/storage/indexeddb/window-onerror.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +44 lines, -0 lines 0 comments Download
A LayoutTests/storage/indexeddb/window-onerror-prevented.html View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
M Source/core/dom/DOMError.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/DOMError.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/events/ErrorEvent.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/indexeddb/IDBRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M Source/modules/indexeddb/IDBRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +22 lines, -3 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
jsbell
haraken@ - This seems like a hacky approach, but I haven't stumbled on anything better. ...
6 years, 8 months ago (2014-04-18 19:36:31 UTC) #1
haraken
On 2014/04/18 19:36:31, jsbell wrote: > haraken@ - This seems like a hacky approach, but ...
6 years, 8 months ago (2014-04-21 02:36:13 UTC) #2
jsbell
https://codereview.chromium.org/243523003/diff/20001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/20001/Source/modules/indexeddb/IDBRequest.cpp#newcode79 Source/modules/indexeddb/IDBRequest.cpp:79: m_creationStackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true); On 2014/04/21 02:36:13, haraken wrote: ...
6 years, 8 months ago (2014-04-21 16:28:37 UTC) #3
jsbell
Also, apologies for the LayoutTests blather in this CL. No need to look at it, ...
6 years, 8 months ago (2014-04-21 17:10:14 UTC) #4
jsbell
mkwest@ - ping? Can you comment on the FIXMEs in IDBRequest.cpp and/or suggest alternate approaches?
6 years, 7 months ago (2014-05-23 19:35:13 UTC) #5
Mike West
On 2014/05/23 19:35:13, jsbell wrote: > mkwest@ - ping? Can you comment on the FIXMEs ...
6 years, 6 months ago (2014-05-29 09:58:00 UTC) #6
jsbell
On 2014/05/29 09:58:00, Mike West wrote: > I'll take a close look at this tomorrow ...
6 years, 6 months ago (2014-06-12 17:50:31 UTC) #7
Mike West
This LGTM. Thanks for putting up with the fact that I'm a terrible, terrible person. ...
6 years, 6 months ago (2014-06-13 09:27:52 UTC) #8
jsbell
Thanks for the review! I'll need to spend some time going through the tests again, ...
6 years, 6 months ago (2014-06-13 16:58:41 UTC) #9
jsbell
ericu@, cmumford@ - can you take a look? I tried to make a reasonable choice ...
6 years, 6 months ago (2014-06-18 18:46:45 UTC) #10
cmumford
On 2014/06/18 18:46:45, jsbell wrote: > ericu@, cmumford@ - can you take a look? > ...
6 years, 6 months ago (2014-06-18 21:09:29 UTC) #11
jsbell
On 2014/06/18 21:09:29, cmumford wrote: > On 2014/06/18 18:46:45, jsbell wrote: > > ericu@, cmumford@ ...
6 years, 6 months ago (2014-06-18 21:11:45 UTC) #12
jsbell
On 2014/06/18 21:11:45, jsbell wrote: > On 2014/06/18 21:09:29, cmumford wrote: > > On 2014/06/18 ...
6 years, 6 months ago (2014-06-18 21:20:43 UTC) #13
jsbell
Er, forgot to copy/paste in this case: >> indexedDB.open('db'+Date.now()).onupgradeneeded = function(e) { var db = ...
6 years, 6 months ago (2014-06-18 21:21:41 UTC) #14
cmumford
https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/persistence.js File LayoutTests/storage/indexeddb/resources/persistence.js (right): https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/persistence.js#newcode16 LayoutTests/storage/indexeddb/resources/persistence.js:16: evt.preventDefault(); Do we also need to call preventDefault in ...
6 years, 6 months ago (2014-06-18 21:32:37 UTC) #15
jsbell
Yes, I should run the perf tests locally... https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/persistence.js File LayoutTests/storage/indexeddb/resources/persistence.js (right): https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/persistence.js#newcode16 LayoutTests/storage/indexeddb/resources/persistence.js:16: evt.preventDefault(); ...
6 years, 6 months ago (2014-06-18 22:28:46 UTC) #16
ericu
https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js File LayoutTests/storage/indexeddb/resources/odd-strings.js (right): https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js#newcode41 LayoutTests/storage/indexeddb/resources/odd-strings.js:41: request.onsuccess = closeDatabase; Can you talk me through this ...
6 years, 6 months ago (2014-06-19 00:54:06 UTC) #17
jsbell
Still owe you an answer to the "empty stack" question. https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js File LayoutTests/storage/indexeddb/resources/odd-strings.js (right): https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js#newcode41 ...
6 years, 6 months ago (2014-06-19 01:13:25 UTC) #18
ericu
https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js File LayoutTests/storage/indexeddb/resources/odd-strings.js (right): https://codereview.chromium.org/243523003/diff/120001/LayoutTests/storage/indexeddb/resources/odd-strings.js#newcode41 LayoutTests/storage/indexeddb/resources/odd-strings.js:41: request.onsuccess = closeDatabase; On 2014/06/19 01:13:24, jsbell wrote: > ...
6 years, 6 months ago (2014-06-19 01:18:40 UTC) #19
jsbell
https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp#newcode502 Source/modules/indexeddb/IDBRequest.cpp:502: if (!m_preventPropagation && dontPreventDefault && event->type() == EventTypeNames::error && ...
6 years, 6 months ago (2014-06-19 17:44:38 UTC) #20
cmumford
https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp#newcode80 Source/modules/indexeddb/IDBRequest.cpp:80: m_creationStackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true); On 2014/06/18 22:28:46, jsbell wrote: ...
6 years, 6 months ago (2014-06-23 15:58:04 UTC) #21
jsbell
https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp#newcode80 Source/modules/indexeddb/IDBRequest.cpp:80: m_creationStackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true); On 2014/06/23 15:58:04, cmumford wrote: ...
6 years, 5 months ago (2014-07-02 19:40:41 UTC) #22
jsbell
https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/120001/Source/modules/indexeddb/IDBRequest.cpp#newcode80 Source/modules/indexeddb/IDBRequest.cpp:80: m_creationStackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, true); And FYI, I tried testing ...
6 years, 5 months ago (2014-07-02 19:59:13 UTC) #23
ericu
lgtm
6 years, 5 months ago (2014-07-02 20:18:48 UTC) #24
haraken
LGTM The implementation looks very weird, but we need to align with the spec and ...
6 years, 5 months ago (2014-07-02 23:25:39 UTC) #25
jsbell
On 2014/07/02 23:25:39, haraken wrote: > LGTM > > The implementation looks very weird, but ...
6 years, 5 months ago (2014-07-02 23:26:59 UTC) #26
jsbell
On 2014/07/02 23:26:59, jsbell wrote: > On 2014/07/02 23:25:39, haraken wrote: > > LGTM > ...
6 years, 5 months ago (2014-07-02 23:28:01 UTC) #27
jsbell
Performance numbers are not good. This is on an Ubuntu z620: https://docs.google.com/a/chromium.org/spreadsheets/d/1m4jwKs0X89u8FMk3_8zYwv0dhl4OU81hb4qKCiv9X2E/edit#gid=0 Slowdown across the ...
6 years, 5 months ago (2014-07-07 21:05:18 UTC) #28
Mike West
On 2014/07/07 at 21:05:18, jsbell wrote: > Performance numbers are not good. This is on ...
6 years, 5 months ago (2014-07-08 13:57:55 UTC) #29
Mike West
(actually +pfeldman)
6 years, 5 months ago (2014-07-08 13:58:15 UTC) #30
cmumford
On 2014/07/07 21:05:18, jsbell wrote: > Performance numbers are not good. This is on an ...
6 years, 5 months ago (2014-07-08 15:11:22 UTC) #31
aandrey
https://codereview.chromium.org/243523003/diff/200001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/200001/Source/modules/indexeddb/IDBRequest.cpp#newcode80 Source/modules/indexeddb/IDBRequest.cpp:80: m_creationStackTrace = createScriptCallStack(ScriptCallStack::maxCallStackSizeToCapture, false); Probably we should collect the ...
6 years, 5 months ago (2014-07-08 18:40:16 UTC) #32
jsbell
On 2014/07/08 18:40:16, aandrey wrote: > https://codereview.chromium.org/243523003/diff/200001/Source/modules/indexeddb/IDBRequest.cpp > File Source/modules/indexeddb/IDBRequest.cpp (right): > > https://codereview.chromium.org/243523003/diff/200001/Source/modules/indexeddb/IDBRequest.cpp#newcode80 > ...
6 years, 5 months ago (2014-07-08 19:22:15 UTC) #33
aandrey
On 2014/07/08 19:22:15, jsbell wrote: > On 2014/07/08 18:40:16, aandrey wrote: > > > https://codereview.chromium.org/243523003/diff/200001/Source/modules/indexeddb/IDBRequest.cpp ...
6 years, 5 months ago (2014-07-08 21:03:05 UTC) #34
Yang
On 2014/07/08 21:03:05, aandrey wrote: > On 2014/07/08 19:22:15, jsbell wrote: > > On 2014/07/08 ...
6 years, 5 months ago (2014-07-09 05:48:33 UTC) #35
jsbell
FYI, I gave this a whirl again, changing the size of the captured stack dynamically ...
6 years ago (2014-12-18 23:45:26 UTC) #36
aandrey
On 2014/12/18 23:45:26, jsbell wrote: > FYI, I gave this a whirl again, changing the ...
6 years ago (2014-12-19 00:40:12 UTC) #37
aandrey
https://codereview.chromium.org/243523003/diff/260001/Source/modules/indexeddb/IDBRequest.cpp File Source/modules/indexeddb/IDBRequest.cpp (right): https://codereview.chromium.org/243523003/diff/260001/Source/modules/indexeddb/IDBRequest.cpp#newcode81 Source/modules/indexeddb/IDBRequest.cpp:81: m_creationStackTrace = createScriptCallStack(stackSize, false); use createScriptCallStackForConsole(). if you need ...
6 years ago (2014-12-19 00:40:28 UTC) #38
jsbell
On 2014/12/19 00:40:28, aandrey wrote: > use createScriptCallStackForConsole(). Thanks. Sadly, no performance improvement. It looks ...
6 years ago (2014-12-20 00:51:48 UTC) #39
jsbell
For the record, I just tried a quick hack that captures the stack outside the ...
6 years ago (2014-12-20 01:01:02 UTC) #40
blink-reviews
Do you think there might be a performance difference on ARM? On Fri Dec 19 ...
6 years ago (2014-12-22 19:54:01 UTC) #41
jsbell
5 years, 3 months ago (2015-09-23 17:38:00 UTC) #42
Message was sent while issue was closed.
migrated to https://codereview.chromium.org/1362953003/

Powered by Google App Engine
This is Rietveld 408576698