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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1419843002: Hold a reference to any kind of context in WindowAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move weak context/activity ref from ActivityWA to WA (WindowAndroid) and remove Context ref in Reso… Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 644076bc9977db203ebaa500e39095e265f64354..86b0f272ddddf7d535b41eaece7d350bda9a27ae 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -911,8 +911,7 @@ public class AwContents implements SmartClipProvider,
Activity activity = ContentViewCore.activityFromContext(context);
if (activity == null) {
if (sCachedWindowAndroid == null) {
- sCachedWindowAndroid = new WindowAndroidWrapper(
- new WindowAndroid(context.getApplicationContext()));
+ sCachedWindowAndroid = new WindowAndroidWrapper(new WindowAndroid(context));
}
return sCachedWindowAndroid;
}

Powered by Google App Engine
This is Rietveld 408576698