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

Issue 690553002: aw: Destroy ContentViewCore and WebContents together (Closed)

Created:
6 years, 1 month ago by boliu
Modified:
6 years, 1 month ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

aw: Destroy ContentViewCore and WebContents together Even though it's having WebContents without a ContentViewCore is a support scenario in //content, it's not a well tested path, especially the webview only code. This makes sure ContentViewCore and WebContents are destroyed together. Instead of posting on native side to destroy WebContents, post on Java side and have one call destroy both Java and native side. More specific details: * All caller except destroy to AwContents.destroyNatives either have already detached webview so ok to move detach to destroy. * Need to remove some asserts that objects are null when mIsDestroyed is true. * Reordered some native AwContents members so they are naturally destroyed in the correct order. BUG= Committed: https://crrev.com/4947ca3ee453380304d0bbb6a382b3eea93a6fca Cr-Commit-Position: refs/heads/master@{#302513}

Patch Set 1 #

Patch Set 2 : fixes #

Patch Set 3 : use Handler #

Total comments: 11

Patch Set 4 : new Handler #

Patch Set 5 : test onPageFinished #

Patch Set 6 : test to ShouldOverrideUrlLoading #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -55 lines) Patch
M android_webview/browser/aw_contents_client_bridge_base.h View 1 chunk +0 lines, -1 line 0 comments Download
M android_webview/browser/aw_contents_client_bridge_base.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 chunks +14 lines, -12 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java View 1 2 3 4 5 4 chunks +58 lines, -14 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java View 1 5 2 chunks +2 lines, -6 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 1 chunk +1 line, -16 lines 0 comments Download

Messages

Total messages: 27 (4 generated)
boliu
PTAL. Having to create a new handler just for this kinda sucks, but apparently using ...
6 years, 1 month ago (2014-10-29 01:50:52 UTC) #2
benm (inactive)
Hmm, need to think carefully about this. We now have a window where after destroy() ...
6 years, 1 month ago (2014-10-29 14:56:15 UTC) #3
boliu
On 2014/10/29 14:56:15, benm wrote: > Hmm, need to think carefully about this. We now ...
6 years, 1 month ago (2014-10-29 15:14:33 UTC) #4
boliu
https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (left): https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode295 android_webview/native/aw_contents.cc:295: // See b/15074651. On 2014/10/29 15:14:33, boliu wrote: > ...
6 years, 1 month ago (2014-10-29 18:51:59 UTC) #5
boliu
On 2014/10/29 18:51:59, boliu wrote: > https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc > File android_webview/native/aw_contents.cc (left): > > https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode295 > ...
6 years, 1 month ago (2014-10-29 18:56:39 UTC) #6
boliu
ping?
6 years, 1 month ago (2014-10-30 15:44:09 UTC) #7
benm (inactive)
On 2014/10/30 15:44:09, boliu wrote: > ping? Hey dude really sorry for the delay, been ...
6 years, 1 month ago (2014-10-30 18:37:27 UTC) #8
benm (inactive)
https://codereview.chromium.org/690553002/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/690553002/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode572 android_webview/java/src/org/chromium/android_webview/AwContents.java:572: mHandler = new Handler(); does this need to be ...
6 years, 1 month ago (2014-10-31 13:53:29 UTC) #9
sgurun-gerrit only
https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (left): https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode306 android_webview/native/aw_contents.cc:306: BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); Have you tried the condition here? ...
6 years, 1 month ago (2014-10-31 19:01:43 UTC) #11
boliu
https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (left): https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode306 android_webview/native/aw_contents.cc:306: BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); On 2014/10/31 19:01:43, sgurun wrote: > ...
6 years, 1 month ago (2014-10-31 19:49:01 UTC) #12
hush (inactive)
https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (left): https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode306 android_webview/native/aw_contents.cc:306: BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); On 2014/10/31 19:49:01, boliu wrote: > ...
6 years, 1 month ago (2014-10-31 20:58:16 UTC) #14
boliu
https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (left): https://codereview.chromium.org/690553002/diff/40001/android_webview/native/aw_contents.cc#oldcode306 android_webview/native/aw_contents.cc:306: BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); On 2014/10/31 20:58:16, hush wrote: > ...
6 years, 1 month ago (2014-10-31 21:47:05 UTC) #15
boliu
On 2014/10/31 21:47:05, boliu wrote: > I think it's pretty obvious it will work. Will ...
6 years, 1 month ago (2014-10-31 22:56:54 UTC) #16
boliu
Made the change Ben suggested. Added a test using onPageFinished https://codereview.chromium.org/690553002/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/690553002/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode572 ...
6 years, 1 month ago (2014-10-31 23:15:25 UTC) #17
benm (inactive)
lgtm
6 years, 1 month ago (2014-11-03 14:26:18 UTC) #18
boliu
sgurun/hush: Any more comments?
6 years, 1 month ago (2014-11-03 16:00:51 UTC) #19
hush (inactive)
On 2014/11/03 16:00:51, boliu wrote: > sgurun/hush: Any more comments? no more from me. Thanks!
6 years, 1 month ago (2014-11-03 18:25:17 UTC) #20
sgurun-gerrit only
On 2014/11/03 18:25:17, hush wrote: > On 2014/11/03 16:00:51, boliu wrote: > > sgurun/hush: Any ...
6 years, 1 month ago (2014-11-03 22:14:52 UTC) #21
sgurun-gerrit only
still lgtm
6 years, 1 month ago (2014-11-03 22:34:28 UTC) #22
boliu
On 2014/11/03 22:34:28, sgurun wrote: > still lgtm Selim pointed out I confused shouldOverrideUrlLoading (called ...
6 years, 1 month ago (2014-11-03 22:36:28 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/690553002/100001
6 years, 1 month ago (2014-11-03 22:37:29 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:100001)
6 years, 1 month ago (2014-11-03 23:24:44 UTC) #26
commit-bot: I haz the power
6 years, 1 month ago (2014-11-03 23:25:26 UTC) #27
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/4947ca3ee453380304d0bbb6a382b3eea93a6fca
Cr-Commit-Position: refs/heads/master@{#302513}

Powered by Google App Engine
This is Rietveld 408576698