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

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed)

Created:
4 years, 5 months ago by dgozman
Modified:
4 years, 5 months ago
Reviewers:
kozy, pfeldman
CC:
chromium-reviews, tzik, eae+blinkwatch, apavlov+blink_chromium.org, kinuko+worker_chromium.org, rwlbuis, jsbell+serviceworker_chromium.org, caseq+blink_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, devtools-reviews_chromium.org, blink-reviews, blink-worker-reviews_chromium.org, sof, lushnikov+blink_chromium.org, nhiroki, haraken, michaeln, serviceworker-reviews, falken, pfeldman+blink_chromium.org, kinuko+serviceworker, horo+watch_chromium.org, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DevTools] Report unhandled exceptions and promise rejections through Runtime. Introduced Runtime.exceptionUnhandled and Runtime.exceptionRevoked methods which report exceptions when Runtime is enabled. Internally, we share the storage with console messages. That means exceptions can be evicted before Runtime.enable was called due to excessive number of console messages. Rough edges: - console.clear also clears the storage for exceptions; - releaseObjectGroup("console") releases exception objects as well; - integration on the frontend reuses ConsoleMessage and is somewhat ugly; - we may want to separate console vs exceptions on backend side. BUG=613882 Committed: https://crrev.com/c19cc78b55454d4d14c1e8888d3972accb879c6e Cr-Commit-Position: refs/heads/master@{#404576}

Patch Set 1 #

Patch Set 2 : tests pass #

Total comments: 16

Patch Set 3 : fixed comments, rebased, fixed 2 tests #

Patch Set 4 : rebase after ExceptionDetails change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+349 lines, -143 lines) Patch
M chrome/test/data/extensions/api_test/uncaught_exception_logging/test.js View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html View 1 2 2 chunks +4 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-revoke-error-expected.txt View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-revoke-error-in-worker-expected.txt View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ExecutionContext.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/MainThreadDebugger.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/WorkerThreadDebugger.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/NullExecutionContext.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/SharedWorkerGlobalScope.cpp View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkletGlobalScope.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp View 1 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js View 1 2 9 chunks +30 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp View 1 2 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8ConsoleAgentImpl.cpp View 1 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8ConsoleMessage.h View 1 2 5 chunks +31 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8ConsoleMessage.cpp View 1 2 3 13 chunks +97 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp View 1 2 3 4 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp View 1 2 4 chunks +21 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/js_protocol.json View 1 2 3 3 chunks +24 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/public/V8ConsoleTypes.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/public/V8Debugger.h View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebConsoleMessage.h View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 34 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2116563003/20001
4 years, 5 months ago (2016-07-06 22:03:06 UTC) #2
dgozman
Could you please take a look?
4 years, 5 months ago (2016-07-06 22:09:41 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/188341) win_chromium_x64_rel_ng on ...
4 years, 5 months ago (2016-07-06 22:53:55 UTC) #7
pfeldman
lgtm https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp#newcode2895 third_party/WebKit/Source/core/dom/Document.cpp:2895: void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation> location) exeptionThrown https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/platform/v8_inspector/js_protocol.json ...
4 years, 5 months ago (2016-07-07 01:12:17 UTC) #8
kozy
lgtm % nits https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp File third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp (right): https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp#newcode41 third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp:41: MainThreadDebugger::instance()->exceptionUnhandled(frame(), errorMessage, std::move(location)); Is threadDebugger always ...
4 years, 5 months ago (2016-07-08 18:49:00 UTC) #9
dgozman
https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp File third_party/WebKit/Source/core/dom/Document.cpp (right): https://codereview.chromium.org/2116563003/diff/20001/third_party/WebKit/Source/core/dom/Document.cpp#newcode2895 third_party/WebKit/Source/core/dom/Document.cpp:2895: void Document::logExceptionToConsole(const String& errorMessage, std::unique_ptr<SourceLocation> location) On 2016/07/07 01:12:17, ...
4 years, 5 months ago (2016-07-08 18:56:41 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2116563003/40001
4 years, 5 months ago (2016-07-09 01:59:36 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-09 04:00:33 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2116563003/40001
4 years, 5 months ago (2016-07-09 04:35:36 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-09 06:36:26 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2116563003/40001
4 years, 5 months ago (2016-07-09 13:59:46 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-09 16:00:28 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2116563003/60001
4 years, 5 months ago (2016-07-09 23:01:52 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-10 00:33:10 UTC) #32
commit-bot: I haz the power
4 years, 5 months ago (2016-07-10 00:35:06 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/c19cc78b55454d4d14c1e8888d3972accb879c6e
Cr-Commit-Position: refs/heads/master@{#404576}

Powered by Google App Engine
This is Rietveld 408576698