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

Issue 625943002: Catch uncaught promise rejections from V8 and log to console. (Closed)

Created:
6 years, 2 months ago by aandrey
Modified:
6 years, 2 months ago
Reviewers:
Jens Widell, pfeldman, yurys
CC:
blink-reviews, arv+blink, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, rwlbuis
Project:
blink
Visibility:
Public.

Description

Catch uncaught promise rejections from V8 and log to console. Print error messages to DevTools console for rejected Promises that are unhandled by the platform end-of-turn. BUG=393913 R=pfeldman, yurys Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183464 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183598 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183659

Patch Set 1 #

Total comments: 20

Patch Set 2 : addressed #

Total comments: 3

Patch Set 3 : addressed #

Patch Set 4 : fix tests #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 5

Patch Set 7 : rebased #

Patch Set 8 : addressed #

Patch Set 9 : catch up with V8 API change #

Patch Set 10 : fix tests #

Patch Set 11 : fixed extensions_unittests #

Patch Set 12 : test fix #2 #

Patch Set 13 : added promise.catch in test-helpers.js #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -12 lines) Patch
M LayoutTests/fast/css/fontfaceset-multiple-faces-download-error.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/fontfaceset-multiple-families.html View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/http/tests/inspector/console-test.js View 1 2 3 4 chunks +21 lines, -7 lines 0 comments Download
M LayoutTests/http/tests/serviceworker/resources/test-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/inspector/console/console-format-es6.html View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
A LayoutTests/inspector/console/console-uncaught-promise.html View 1 2 3 4 5 6 7 1 chunk +72 lines, -0 lines 0 comments Download
A LayoutTests/inspector/console/console-uncaught-promise-expected.txt View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/inspector/sources/debugger/debugger-uncaught-promise-on-pause.html View 1 2 3 4 5 6 7 1 chunk +83 lines, -0 lines 0 comments Download
A LayoutTests/inspector/sources/debugger/debugger-uncaught-promise-on-pause-expected.txt View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M LayoutTests/inspector/sources/debugger/event-listener-breakpoints-promises.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/V8Initializer.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/core/v8/V8Initializer.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +76 lines, -0 lines 0 comments Download
M Source/web/WebKit.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 39 (12 generated)
aandrey
Right now this just prints "Uncaught promise reject" to console w/o any useful stuff, like ...
6 years, 2 months ago (2014-10-03 13:26:10 UTC) #1
yurys
We will need a test for this. https://codereview.chromium.org/625943002/diff/1/Source/bindings/core/v8/ScriptValue.cpp File Source/bindings/core/v8/ScriptValue.cpp (right): https://codereview.chromium.org/625943002/diff/1/Source/bindings/core/v8/ScriptValue.cpp#newcode44 Source/bindings/core/v8/ScriptValue.cpp:44: v8::Local<v8::Value> value ...
6 years, 2 months ago (2014-10-03 15:08:06 UTC) #2
aandrey
https://codereview.chromium.org/625943002/diff/1/Source/bindings/core/v8/ScriptValue.cpp File Source/bindings/core/v8/ScriptValue.cpp (right): https://codereview.chromium.org/625943002/diff/1/Source/bindings/core/v8/ScriptValue.cpp#newcode44 Source/bindings/core/v8/ScriptValue.cpp:44: v8::Local<v8::Value> value = m_value->newLocal(isolate()); On 2014/10/03 15:08:05, yurys wrote: ...
6 years, 2 months ago (2014-10-06 10:52:57 UTC) #3
pfeldman
Capturing offline discussion comments here. https://codereview.chromium.org/625943002/diff/20001/Source/bindings/core/v8/ScriptValue.h File Source/bindings/core/v8/ScriptValue.h (right): https://codereview.chromium.org/625943002/diff/20001/Source/bindings/core/v8/ScriptValue.h#newcode147 Source/bindings/core/v8/ScriptValue.h:147: ScriptValue(WTF::HashTableDeletedValueType) : m_scriptState(WTF::HashTableDeletedValue) { ...
6 years, 2 months ago (2014-10-06 13:11:59 UTC) #4
aandrey
Addressed. PTAL.
6 years, 2 months ago (2014-10-06 15:30:50 UTC) #5
pfeldman
lgtm. https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp File Source/bindings/core/v8/V8Initializer.cpp (right): https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp#newcode177 Source/bindings/core/v8/V8Initializer.cpp:177: if (scriptState->contextIsValid()) That's a really bad name. Lets ...
6 years, 2 months ago (2014-10-06 19:40:13 UTC) #6
Jens Widell
https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp File Source/bindings/core/v8/V8Initializer.cpp (right): https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp#newcode177 Source/bindings/core/v8/V8Initializer.cpp:177: if (scriptState->contextIsValid()) On 2014/10/06 19:40:13, pfeldman wrote: > That's ...
6 years, 2 months ago (2014-10-07 05:22:23 UTC) #8
yurys
lgtm https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp File Source/bindings/core/v8/V8Initializer.cpp (right): https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp#newcode195 Source/bindings/core/v8/V8Initializer.cpp:195: scriptState->executionContext()->addConsoleMessage(consoleMessage.release()); We should be careful not to call ...
6 years, 2 months ago (2014-10-07 05:32:44 UTC) #9
aandrey
https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp File Source/bindings/core/v8/V8Initializer.cpp (right): https://codereview.chromium.org/625943002/diff/100001/Source/bindings/core/v8/V8Initializer.cpp#newcode177 Source/bindings/core/v8/V8Initializer.cpp:177: if (scriptState->contextIsValid()) On 2014/10/07 05:22:23, Jens Widell wrote: > ...
6 years, 2 months ago (2014-10-07 10:03:38 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/140001
6 years, 2 months ago (2014-10-07 10:04:32 UTC) #12
aandrey
Waiting for V8 API changes: https://codereview.chromium.org/630373003/
6 years, 2 months ago (2014-10-07 10:34:44 UTC) #14
aandrey
Ready to land after rolling V8 r24432.
6 years, 2 months ago (2014-10-07 12:55:40 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/180001
6 years, 2 months ago (2014-10-08 20:12:11 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_triggered_tests/builds/56254)
6 years, 2 months ago (2014-10-08 20:33:11 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/180001
6 years, 2 months ago (2014-10-09 13:12:53 UTC) #21
commit-bot: I haz the power
Committed patchset #10 (id:180001) as 183464
6 years, 2 months ago (2014-10-09 14:17:23 UTC) #22
apavlov
A revert of this CL (patchset #10 id:180001) has been created in https://codereview.chromium.org/648443002/ by apavlov@chromium.org. ...
6 years, 2 months ago (2014-10-09 15:10:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/200001
6 years, 2 months ago (2014-10-13 07:22:09 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/26813)
6 years, 2 months ago (2014-10-13 07:35:58 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/380001
6 years, 2 months ago (2014-10-13 08:09:18 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/28939)
6 years, 2 months ago (2014-10-13 09:10:12 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/520001
6 years, 2 months ago (2014-10-13 10:13:15 UTC) #33
commit-bot: I haz the power
Committed patchset #13 (id:520001) as 183598
6 years, 2 months ago (2014-10-13 11:15:15 UTC) #34
cbiesinger
A revert of this CL (patchset #13 id:520001) has been created in https://codereview.chromium.org/650203003/ by cbiesinger@chromium.org. ...
6 years, 2 months ago (2014-10-13 16:17:10 UTC) #35
aandrey
Skipped the broken tests, see crbug.com/423267
6 years, 2 months ago (2014-10-14 09:46:19 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/625943002/520001
6 years, 2 months ago (2014-10-14 09:46:49 UTC) #38
commit-bot: I haz the power
6 years, 2 months ago (2014-10-14 09:47:57 UTC) #39
Message was sent while issue was closed.
Committed patchset #13 (id:520001) as 183659

Powered by Google App Engine
This is Rietveld 408576698