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

Issue 2242173003: Ignore multiple assignments to global context. (Closed)

Created:
4 years, 4 months ago by Peter Wen
Modified:
4 years, 4 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

Ignore multiple assignments to global context. WebView encounters applications where they override getApplicationContext and return fresh instances or wrappers every time it is called. We cannot rely on that method and so we assume that the first assignment is the most correct one. BUG=637389 Committed: https://crrev.com/10f8626fd501f0f58f7136e27da134678300a439 Cr-Commit-Position: refs/heads/master@{#412845}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Switch to debug. #

Patch Set 3 : Add TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M base/android/java/src/org/chromium/base/ContextUtils.java View 1 2 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 29 (10 generated)
Peter Wen
🚀
4 years, 4 months ago (2016-08-15 21:11:58 UTC) #4
boliu
https://codereview.chromium.org/2242173003/diff/1/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/2242173003/diff/1/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java#newcode195 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java:195: ResourcesContextWrapperFactory.get(mWebViewDelegate.getApplication())); while I don't necessarily think this is wrong, ...
4 years, 4 months ago (2016-08-15 21:16:38 UTC) #5
Peter Wen
https://codereview.chromium.org/2242173003/diff/1/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/2242173003/diff/1/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java#newcode195 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java:195: ResourcesContextWrapperFactory.get(mWebViewDelegate.getApplication())); On 2016/08/15 21:16:38, boliu wrote: > while I ...
4 years, 4 months ago (2016-08-15 21:49:55 UTC) #8
boliu
https://codereview.chromium.org/2242173003/diff/1/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/2242173003/diff/1/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java#newcode195 android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java:195: ResourcesContextWrapperFactory.get(mWebViewDelegate.getApplication())); On 2016/08/15 21:49:54, Peter Wen wrote: > On ...
4 years, 4 months ago (2016-08-15 22:21:32 UTC) #9
boliu
https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java File base/android/java/src/org/chromium/base/ContextUtils.java (right): https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java#newcode61 base/android/java/src/org/chromium/base/ContextUtils.java:61: Log.e(TAG, "Multiple contexts detected, ignoring new application context."); On ...
4 years, 4 months ago (2016-08-15 22:44:03 UTC) #10
Torne
Peter, wasn't the idea that we were going to go through and fix the context ...
4 years, 4 months ago (2016-08-16 13:46:57 UTC) #12
Peter Wen
On 2016/08/16 13:46:57, Torne wrote: > Peter, wasn't the idea that we were going to ...
4 years, 4 months ago (2016-08-16 13:56:48 UTC) #13
Peter Wen
https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java File base/android/java/src/org/chromium/base/ContextUtils.java (right): https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java#newcode61 base/android/java/src/org/chromium/base/ContextUtils.java:61: Log.e(TAG, "Multiple contexts detected, ignoring new application context."); On ...
4 years, 4 months ago (2016-08-16 13:57:46 UTC) #14
Torne
On 2016/08/16 13:57:46, Peter Wen wrote: > https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java > File base/android/java/src/org/chromium/base/ContextUtils.java (right): > > https://codereview.chromium.org/2242173003/diff/1/base/android/java/src/org/chromium/base/ContextUtils.java#newcode61 ...
4 years, 4 months ago (2016-08-16 13:59:06 UTC) #15
Peter Wen
On 2016/08/16 13:59:06, Torne wrote: > Well why does LibraryLoader need to set the application ...
4 years, 4 months ago (2016-08-16 14:02:23 UTC) #16
Peter Wen
CL: https://codereview.chromium.org/2247143004/ Closing this as it's no longer necessary.
4 years, 4 months ago (2016-08-16 16:50:36 UTC) #17
boliu
On 2016/08/16 16:50:36, Peter Wen wrote: > CL: https://codereview.chromium.org/2247143004/ That one looks too big to ...
4 years, 4 months ago (2016-08-16 16:51:52 UTC) #19
Peter Wen
Good point. Let's fix this for now and add the exception back once the other ...
4 years, 4 months ago (2016-08-16 17:01:21 UTC) #20
Peter Wen
PTAL. :)
4 years, 4 months ago (2016-08-16 17:01:33 UTC) #21
boliu
lg2m
4 years, 4 months ago (2016-08-16 17:02:28 UTC) #22
Torne
lgtm
4 years, 4 months ago (2016-08-18 14:42:44 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2242173003/40001
4 years, 4 months ago (2016-08-18 14:53:04 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-18 15:49:24 UTC) #27
commit-bot: I haz the power
4 years, 4 months ago (2016-08-18 15:52:50 UTC) #29
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/10f8626fd501f0f58f7136e27da134678300a439
Cr-Commit-Position: refs/heads/master@{#412845}

Powered by Google App Engine
This is Rietveld 408576698