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

Issue 744653002: Ignore DevTools messages from the old inspected RVH after navigation (Closed)

Created:
6 years, 1 month ago by yurys
Modified:
6 years ago
CC:
chromium-reviews, vsevik, creis+watch_chromium.org, nasko+codewatch_chromium.org, yurys, paulirish+reviews_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, aandrey+blink_chromium.org, pfeldman, loislo, alph, nasko, clamy
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Ignore DevTools messages from the old inspected RVH after navigation DevToolsAgent and DevToolsClient now use main RenderFrame for exchanging messages with their hosts. This way we always have source RenderFrameHost when dispatching DevTools message on the browser side and can detect that the message was sent by old renderer after DevTools client already attached to the new renderer after navigation. Messages from old main renderer are ignored just like it had been before crrev.com/288297. This also allows to use RFH instead of RVH in many places on the browser side. BUG=435025 Committed: https://crrev.com/65e008fd79d83908525452783452e69af8e7299c Cr-Commit-Position: refs/heads/master@{#305619}

Patch Set 1 #

Patch Set 2 : #

Total comments: 7

Patch Set 3 : Rebase #

Patch Set 4 : Send DevTools messages using main render frame instead of render view #

Patch Set 5 : Use WebContents instead of RVH when creating DTFH #

Total comments: 10

Patch Set 6 : #

Patch Set 7 : Addressed comments #

Total comments: 2

Patch Set 8 : Addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -61 lines) Patch
M chrome/browser/devtools/devtools_ui_bindings.cc View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M content/browser/devtools/devtools_frontend_host_impl.h View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/devtools/devtools_frontend_host_impl.cc View 1 2 3 4 5 6 7 1 chunk +12 lines, -9 lines 0 comments Download
M content/browser/devtools/render_view_devtools_agent_host.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/devtools/render_view_devtools_agent_host.cc View 1 2 3 4 5 2 chunks +8 lines, -7 lines 0 comments Download
M content/public/browser/devtools_frontend_host.h View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/devtools/devtools_agent.h View 1 2 3 4 5 4 chunks +7 lines, -3 lines 0 comments Download
M content/renderer/devtools/devtools_agent.cc View 1 2 3 4 5 5 chunks +18 lines, -15 lines 0 comments Download
M content/renderer/devtools/devtools_client.h View 1 2 3 3 chunks +4 lines, -6 lines 0 comments Download
M content/renderer/devtools/devtools_client.cc View 1 2 3 1 chunk +5 lines, -8 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_devtools_frontend.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (5 generated)
yurys
6 years, 1 month ago (2014-11-20 13:30:06 UTC) #2
pfeldman
lgtm
6 years, 1 month ago (2014-11-20 13:39:34 UTC) #3
yurys
@jam: please review content/browser/web_contents/web_contents_impl.cc
6 years, 1 month ago (2014-11-20 13:47:09 UTC) #5
dgozman
Doesn't this sound like a WCO bug? Why is there an IPC from the old ...
6 years, 1 month ago (2014-11-20 18:33:13 UTC) #7
jam
given that RVH is going away, using it here would only be a short-term fix. ...
6 years, 1 month ago (2014-11-20 21:19:45 UTC) #8
Charlie Reis
On 2014/11/20 18:33:13, dgozman wrote: > Doesn't this sound like a WCO bug? Why is ...
6 years, 1 month ago (2014-11-20 23:11:10 UTC) #10
yurys
https://codereview.chromium.org/744653002/diff/20001/content/browser/devtools/render_view_devtools_agent_host.cc File content/browser/devtools/render_view_devtools_agent_host.cc (left): https://codereview.chromium.org/744653002/diff/20001/content/browser/devtools/render_view_devtools_agent_host.cc#oldcode332 content/browser/devtools/render_view_devtools_agent_host.cc:332: bool RenderViewDevToolsAgentHost::OnMessageReceived( On 2014/11/20 23:11:10, Charlie Reis wrote: > ...
6 years, 1 month ago (2014-11-21 08:14:14 UTC) #11
Charlie Reis
Thanks for clarifying-- a few notes below. https://codereview.chromium.org/744653002/diff/20001/content/browser/devtools/render_view_devtools_agent_host.cc File content/browser/devtools/render_view_devtools_agent_host.cc (left): https://codereview.chromium.org/744653002/diff/20001/content/browser/devtools/render_view_devtools_agent_host.cc#oldcode332 content/browser/devtools/render_view_devtools_agent_host.cc:332: bool RenderViewDevToolsAgentHost::OnMessageReceived( ...
6 years, 1 month ago (2014-11-22 00:38:17 UTC) #12
yurys
I changed DevToolsAgent and DevToolsClient to use main RenderFrame for exchanging messages with their hosts. ...
6 years ago (2014-11-24 13:19:30 UTC) #13
pfeldman
lgtm w/ nits https://codereview.chromium.org/744653002/diff/80001/content/browser/devtools/render_view_devtools_agent_host.cc File content/browser/devtools/render_view_devtools_agent_host.cc (right): https://codereview.chromium.org/744653002/diff/80001/content/browser/devtools/render_view_devtools_agent_host.cc#newcode340 content/browser/devtools/render_view_devtools_agent_host.cc:340: if (render_frame_host != render_view_host_->GetMainFrame()) { Should ...
6 years ago (2014-11-24 13:31:19 UTC) #14
dgozman
https://codereview.chromium.org/744653002/diff/80001/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/744653002/diff/80001/chrome/browser/devtools/devtools_ui_bindings.cc#newcode285 chrome/browser/devtools/devtools_ui_bindings.cc:285: content::DevToolsFrontendHost::Create(devtools_bindings_->web_contents(), If you create DevToolsFrontendHost for a WebContents instance, ...
6 years ago (2014-11-24 13:32:13 UTC) #15
yurys
https://codereview.chromium.org/744653002/diff/80001/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/744653002/diff/80001/chrome/browser/devtools/devtools_ui_bindings.cc#newcode285 chrome/browser/devtools/devtools_ui_bindings.cc:285: content::DevToolsFrontendHost::Create(devtools_bindings_->web_contents(), On 2014/11/24 13:32:13, dgozman wrote: > If you ...
6 years ago (2014-11-24 14:08:54 UTC) #16
dgozman
lgtm
6 years ago (2014-11-24 14:26:08 UTC) #17
yurys
@creis: please do OWNERS review, I've changed the code the way you suggested.
6 years ago (2014-11-24 16:26:51 UTC) #18
Charlie Reis
Great, thanks! LGTM with one question below. https://codereview.chromium.org/744653002/diff/120001/content/browser/devtools/devtools_frontend_host_impl.cc File content/browser/devtools/devtools_frontend_host_impl.cc (right): https://codereview.chromium.org/744653002/diff/120001/content/browser/devtools/devtools_frontend_host_impl.cc#newcode35 content/browser/devtools/devtools_frontend_host_impl.cc:35: RenderFrameHost* render_frame_host) ...
6 years ago (2014-11-24 17:46:27 UTC) #19
yurys
https://codereview.chromium.org/744653002/diff/120001/content/browser/devtools/devtools_frontend_host_impl.cc File content/browser/devtools/devtools_frontend_host_impl.cc (right): https://codereview.chromium.org/744653002/diff/120001/content/browser/devtools/devtools_frontend_host_impl.cc#newcode35 content/browser/devtools/devtools_frontend_host_impl.cc:35: RenderFrameHost* render_frame_host) { On 2014/11/24 17:46:26, Charlie Reis wrote: ...
6 years ago (2014-11-25 09:47:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/744653002/140001
6 years ago (2014-11-25 09:48:05 UTC) #22
commit-bot: I haz the power
Committed patchset #8 (id:140001)
6 years ago (2014-11-25 11:29:57 UTC) #23
commit-bot: I haz the power
6 years ago (2014-11-25 11:30:52 UTC) #24
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/65e008fd79d83908525452783452e69af8e7299c
Cr-Commit-Position: refs/heads/master@{#305619}

Powered by Google App Engine
This is Rietveld 408576698