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

Issue 1879453002: Reset Text Input State for RenderWidgetHostView before RenderWidgetHost Detaches from Delegate (Closed)

Created:
4 years, 8 months ago by EhsanK
Modified:
4 years, 8 months ago
Reviewers:
kenrb, Charlie Reis, lazyboy
CC:
chromium-reviews, darin-cc_chromium.org, jam, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reset Text Input State for RenderWidgetHostView before RenderWidgetHost Detaches from Delegate During the destruction of WebContentsImpl, the RWHs are first detached and then destroyed. If some RWHV has an active input field, then it will never get a chance to notify the WebContentsImpl about losing being destroyed and the WebContentsImpl will track the wrong text input state. This will cause DCHECK in WebContentsImpl::GetTextInputState being triggered, specifically, for an outer WebContents which might outlive the WebContents being destroyed. BUG=602144, 601570 Committed: https://crrev.com/5292d041d34d49e8c3e851a0e21504a983e5be57 Cr-Commit-Position: refs/heads/master@{#387311}

Patch Set 1 #

Patch Set 2 : Added a Test #

Total comments: 14

Patch Set 3 : Addressing creis@ comments #

Total comments: 4

Patch Set 4 : Addressing lazyboy@ comments #

Total comments: 2

Patch Set 5 : Addressing lazyboy@ comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -4 lines) Patch
M chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc View 1 2 3 4 2 chunks +38 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879453002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879453002/1
4 years, 8 months ago (2016-04-11 03:07:44 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-11 04:01:59 UTC) #4
EhsanK
PTAL. For context, please take a look at WebContentsImpl::GetTextInputState(). We added a DCHECK to make ...
4 years, 8 months ago (2016-04-11 04:06:31 UTC) #6
Charlie Reis
[+kenrb] Thanks for the fix. Can you add a test for it, given the nice ...
4 years, 8 months ago (2016-04-11 05:45:32 UTC) #8
EhsanK
On 2016/04/11 05:45:32, Charlie Reis wrote: > [+kenrb] > > Thanks for the fix. Can ...
4 years, 8 months ago (2016-04-11 06:47:08 UTC) #9
Charlie Reis
Thanks. I think you'll need someone familiar with BrowserPlugin to review the test. (I'm not ...
4 years, 8 months ago (2016-04-11 20:24:52 UTC) #10
EhsanK
PTAL. Adding lazyboy@ for BrowserPluginGuest and WebView test reviews. creis@, kenrb@: I was wondering if ...
4 years, 8 months ago (2016-04-11 21:59:18 UTC) #11
EhsanK
lazyboy@chromium.org: Please review changes in
4 years, 8 months ago (2016-04-11 21:59:36 UTC) #13
Charlie Reis
Thanks, LGTM if lazyboy is happy with the browser_plugin_guest.cc change and the test. https://codereview.chromium.org/1879453002/diff/20001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc File ...
4 years, 8 months ago (2016-04-11 22:18:17 UTC) #14
lazyboy
One TODO suggestion for OnDetach(), let me know if you agree. https://codereview.chromium.org/1879453002/diff/40001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc File chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc (right): ...
4 years, 8 months ago (2016-04-12 04:11:54 UTC) #15
EhsanK
Thanks! PTAL. https://codereview.chromium.org/1879453002/diff/40001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc File chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc (right): https://codereview.chromium.org/1879453002/diff/40001/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc#newcode1471 chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc:1471: // State should reset to none. On ...
4 years, 8 months ago (2016-04-12 15:06:50 UTC) #16
lazyboy
https://codereview.chromium.org/1879453002/diff/60001/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js File chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js (right): https://codereview.chromium.org/1879453002/diff/60001/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js#newcode35 chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js:35: chrome.test.failed(); s/failed/fail but we actually need to send a ...
4 years, 8 months ago (2016-04-12 17:11:44 UTC) #17
EhsanK
Thanks! PTAL. https://codereview.chromium.org/1879453002/diff/60001/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js File chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js (right): https://codereview.chromium.org/1879453002/diff/60001/chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js#newcode35 chrome/test/data/extensions/platform_apps/web_view/text_input_state/window.js:35: chrome.test.failed(); On 2016/04/12 17:11:44, lazyboy wrote: > ...
4 years, 8 months ago (2016-04-12 17:35:43 UTC) #18
lazyboy
BrowserPluginGuest changes and tests LGTM.
4 years, 8 months ago (2016-04-12 17:37:42 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879453002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879453002/80001
4 years, 8 months ago (2016-04-13 01:12:23 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/204089)
4 years, 8 months ago (2016-04-13 03:30:33 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879453002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879453002/80001
4 years, 8 months ago (2016-04-14 01:20:20 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-14 03:36:32 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1879453002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1879453002/80001
4 years, 8 months ago (2016-04-14 14:26:08 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 8 months ago (2016-04-14 14:31:02 UTC) #31
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/5292d041d34d49e8c3e851a0e21504a983e5be57 Cr-Commit-Position: refs/heads/master@{#387311}
4 years, 8 months ago (2016-04-14 14:32:38 UTC) #33
EhsanK
4 years, 8 months ago (2016-04-15 19:18:02 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/1887303004/ by ekaramad@chromium.org.

The reason for reverting is: This is needed to revert 
https://codereview.chromium.org/1652483002/. The original CL caused many
regressions..

Powered by Google App Engine
This is Rietveld 408576698