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

Issue 2076623002: 🍳 Fix and clean up application context in webview. (Closed)

Created:
4 years, 6 months ago by Peter Wen
Modified:
4 years, 6 months ago
Reviewers:
boliu, Torne
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix and clean up application context in webview. - Move responsibility of application context initialization in AwBrowserProcess to caller to prevent double initialization. - Switch to using ContextUtils.getApplicationContext for methods that only need the application context. Ensures the wrapped context is always used. - Move away from using mWebViewDelegate.getApplication as that returns the raw unwrapped application object. BUG=620790 Committed: https://crrev.com/3680ea1ea5f72a714dc3e9d690263a29ca68d0ec Cr-Commit-Position: refs/heads/master@{#400664}

Patch Set 1 #

Patch Set 2 : Directly use ContextUtils. #

Patch Set 3 : Fix glue. #

Patch Set 4 : Unify test context init to AwTestBase. #

Patch Set 5 : Fix tests. #

Total comments: 2

Patch Set 6 : Wrap context. #

Messages

Total messages: 14 (7 generated)
Peter Wen
🍵
4 years, 6 months ago (2016-06-16 18:55:48 UTC) #4
boliu
https://codereview.chromium.org/2076623002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java (right): https://codereview.chromium.org/2076623002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java#newcode121 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java:121: ResourcesContextWrapperFactory.get(mWebViewDelegate.getApplication())); came here to say should add getApplicationContext here, ...
4 years, 6 months ago (2016-06-16 21:09:46 UTC) #6
Peter Wen
Added additional getApplicationContext call. https://codereview.chromium.org/2076623002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java File android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java (right): https://codereview.chromium.org/2076623002/diff/80001/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java#newcode121 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java:121: ResourcesContextWrapperFactory.get(mWebViewDelegate.getApplication())); On 2016/06/16 21:09:46, boliu ...
4 years, 6 months ago (2016-06-16 21:29:03 UTC) #7
Torne
lgtm
4 years, 6 months ago (2016-06-17 10:35:46 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2076623002/100001
4 years, 6 months ago (2016-06-20 12:22:46 UTC) #10
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 6 months ago (2016-06-20 13:03:56 UTC) #12
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 13:06:18 UTC) #14
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3680ea1ea5f72a714dc3e9d690263a29ca68d0ec
Cr-Commit-Position: refs/heads/master@{#400664}

Powered by Google App Engine
This is Rietveld 408576698