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

Issue 1890513004: Remove dependency on the DevTools agent for console logs. (Closed)

Created:
4 years, 8 months ago by carlosk
Modified:
4 years, 8 months ago
CC:
dcheng, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, clamy, creis+watch_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-blink_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove dependency on the DevTools agent for console logs. With the upcoming change of having web security related checks made in the browser process there's the need of sending messages to the affected frame console. The current implementation depended on the devtools agent being set for the renderer; when that was not true logs would be dropped silently. This was the case when running layout tests. This change removes that dependency so that log requests coming from the browser process during layout tests are executed. BUG=576270 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation TBR=nasko@chromium.org Committed: https://crrev.com/91da0781306a006952e67ee4423a59a5a0da8fb6 Cr-Commit-Position: refs/heads/master@{#389441}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Added new enum to WebConsoleMessage to mirror MessageSource and more. #

Total comments: 8

Patch Set 3 : Changes from dcheng@ comments. #

Patch Set 4 : Removed extra Source prefix from strongly typed enum. #

Patch Set 5 : Rebase. #

Total comments: 7

Patch Set 6 : Testing not checking for DevTools agent existence before logging to console. #

Patch Set 7 : Reuse current console log call but removed devtools agent dependency. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -36 lines) Patch
M content/common/frame_messages.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/devtools/devtools_agent.h View 2 chunks +0 lines, -4 lines 0 comments Download
M content/renderer/devtools/devtools_agent.cc View 2 chunks +0 lines, -25 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 2 chunks +20 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (10 generated)
carlosk
nasko@, mkwst@: PTAL.
4 years, 8 months ago (2016-04-14 11:56:59 UTC) #3
pfeldman
Please introduce the "source" enum in the WebConsoleMessage instead, it should mimic the Blink one. ...
4 years, 8 months ago (2016-04-14 13:09:11 UTC) #4
carlosk
Thanks. On 2016/04/14 13:09:11, pfeldman_ooo wrote: > Please introduce the "source" enum in the WebConsoleMessage ...
4 years, 8 months ago (2016-04-14 13:15:23 UTC) #5
nasko
https://codereview.chromium.org/1890513004/diff/1/content/public/browser/render_frame_host.h File content/public/browser/render_frame_host.h (right): https://codereview.chromium.org/1890513004/diff/1/content/public/browser/render_frame_host.h#newcode126 content/public/browser/render_frame_host.h:126: virtual void AddSecurityMessageToConsole(ConsoleMessageLevel level, Why add a public method ...
4 years, 8 months ago (2016-04-14 14:14:44 UTC) #6
carlosk
Thanks! I addressed current comments but I'm waiting on pfeldman@ reply to decide on reverting ...
4 years, 8 months ago (2016-04-14 15:28:04 UTC) #7
dcheng
https://codereview.chromium.org/1890513004/diff/20001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1890513004/diff/20001/content/renderer/render_frame_impl.cc#newcode800 content/renderer/render_frame_impl.cc:800: case CONSOLE_MESSAGE_LEVEL_DEBUG: Why can't we just use the blink ...
4 years, 8 months ago (2016-04-14 17:29:11 UTC) #8
carlosk
Thanks dcheng@. This is my 1st Blink CL and I don't know the usual practices ...
4 years, 8 months ago (2016-04-15 09:42:44 UTC) #9
carlosk
mkwst@, pfeldman@ and dcheng@: can I have an update from you so that I can ...
4 years, 8 months ago (2016-04-20 09:51:52 UTC) #10
pfeldman
https://codereview.chromium.org/1890513004/diff/80001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1890513004/diff/80001/content/browser/frame_host/render_frame_host_impl.cc#newcode359 content/browser/frame_host/render_frame_host_impl.cc:359: void RenderFrameHostImpl::AddSecurityMessageToConsole( We already have one above. https://codereview.chromium.org/1890513004/diff/80001/content/browser/frame_host/render_frame_host_impl.h File ...
4 years, 8 months ago (2016-04-21 21:48:30 UTC) #12
carlosk
I know we already had a console log IPC and I mentioned the differences between ...
4 years, 8 months ago (2016-04-22 14:33:55 UTC) #13
pfeldman
lgtm. it seems like oopif made devtools_agent conditional and did not resolve this console plumbing. ...
4 years, 8 months ago (2016-04-22 17:16:07 UTC) #16
carlosk
On 2016/04/22 17:16:07, pfeldman wrote: > lgtm. it seems like oopif made devtools_agent conditional and ...
4 years, 8 months ago (2016-04-22 19:05:39 UTC) #17
pfeldman
Right, the source. No, I don't think it is required at this point. If we ...
4 years, 8 months ago (2016-04-22 19:12:10 UTC) #18
pfeldman
So feel free to land this. Since you only touched a comment in the messages ...
4 years, 8 months ago (2016-04-22 19:13:18 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1890513004/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1890513004/120001
4 years, 8 months ago (2016-04-25 09:13:57 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-25 10:30:27 UTC) #24
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/91da0781306a006952e67ee4423a59a5a0da8fb6 Cr-Commit-Position: refs/heads/master@{#389441}
4 years, 8 months ago (2016-04-25 10:31:59 UTC) #26
dcheng
4 years, 8 months ago (2016-04-25 18:22:39 UTC) #28
Message was sent while issue was closed.
ipc changes lgtm

Powered by Google App Engine
This is Rietveld 408576698