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

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

Issue 1514903002: Move some calls from the Android UI thread to the Chrome one (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass findbug Created 5 years 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
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwDataReductionProxyManager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ebebc65756f431bc1ee8074423dde2d1b2e5ccef..1bcf5fa42694aa6c6535199b168bdc2725503043 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -640,7 +640,12 @@ public void onTrimMemory(final int level) {
if (isDestroyed(NO_WARN)) return;
boolean visibleRectEmpty = getGlobalVisibleRect().isEmpty();
final boolean visible = mIsViewVisible && mIsWindowVisible && !visibleRectEmpty;
- nativeTrimMemory(mNativeAwContents, level, visible);
+ ThreadUtils.runOnUiThread(new Runnable() {
boliu 2015/12/10 22:03:14 I think new code is not wrong, but I kinda want to
+ @Override
+ public void run() {
+ nativeTrimMemory(mNativeAwContents, level, visible);
+ }
+ });
}
@Override
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwDataReductionProxyManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698