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

Issue 2544893002: [DevTools] Migrate InputHandler from RenderWidgetHostImpl to RenderFrameHostImpl. (Closed)

Created:
4 years ago by dgozman
Modified:
4 years ago
Reviewers:
samuong, clamy, pfeldman
CC:
chromium-reviews, jam, darin-cc_chromium.org, pfeldman, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DevTools] Migrate InputHandler from RenderWidgetHostImpl to RenderFrameHostImpl. The lifetime of RenderWidgetHostImpl is not guaranteed and doesn't align with our raw-pointer usage. Grabbing it through RenderFrameHostImpl works. BUG=none

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -21 lines) Patch
M content/browser/devtools/protocol/input_handler.h View 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/devtools/protocol/input_handler.cc View 11 chunks +17 lines, -16 lines 0 comments Download
M content/browser/devtools/render_frame_devtools_agent_host.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
dgozman
Could you please take a look?
4 years ago (2016-12-01 20:32:08 UTC) #2
samuong
lgtm https://codereview.chromium.org/2387353004/ needs to add and remove InputEventObservers from the RWHI. If the RFHI can ...
4 years ago (2016-12-01 20:56:26 UTC) #5
dgozman
On 2016/12/01 20:56:26, samuong wrote: > lgtm > > https://codereview.chromium.org/2387353004/ needs to add and remove ...
4 years ago (2016-12-01 21:59:02 UTC) #8
samuong
Unfortunately this didn't work, so not lgtm for now: http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/348303 It's still crashing in the ...
4 years ago (2016-12-02 21:37:59 UTC) #9
samuong
After running another try job with some extra debug statements, I've found that we are ...
4 years ago (2016-12-02 23:06:03 UTC) #10
samuong
just wanted to follow up on this - can you let me know what you ...
4 years ago (2016-12-06 21:44:01 UTC) #11
dgozman
[+clamy] Sorry, this one slipped through. I think this is a real bug, which only ...
4 years ago (2016-12-06 21:52:49 UTC) #13
clamy
Ok so as far as I understand, the stack trace you see corresponds to a ...
4 years ago (2016-12-07 14:51:32 UTC) #14
clamy
4 years ago (2016-12-07 14:54:02 UTC) #15
On 2016/12/07 14:51:32, clamy wrote:
> Ok so as far as I understand, the stack trace you see corresponds to a very
> precise case:
> - you had a cross-site navigation for which you received a response but it has
> not committed yet (this state is not supposed to last long in PlzNavigate but
it
> happens).
> - it gets interrupted by the start of a new navigation -> this causes us to
> delete the speculative RFH that was supposed to commit it and which was
holding
> the NavigationHandle. The deletion of the NavigationHandle at the end of the
> RFHI dtor fires DidFinishNavigation.
> - we then call DiscardPending (since the navigation in the speculative RFH did
> not commit), which causes us to set the current RFH back in the protocol
> handlers. If one of them tries to access the RFH that they had previously (ie
> the speculative), then there would be a problem, since we're being called
whild
> it's half destroyed.
> 
> If that's the case, I would suggest checking in RenderFrameDeleted that the
> frame deleted is pending RFH, and updating the protocol handlers at that time.
> Normally this should happen before the end of RFHI dtor implementation.

Alternatively, we could also explicitly reset the NavigationHandle before
reaching the end of the dtor, which would allow DidFinishNavigation to be called
before the RFH has started to be destroyed. This might be cleaner actually,
since you may not be the only one having the issue.

Powered by Google App Engine
This is Rietveld 408576698