Loading core/java/android/webkit/WebViewFactory.java +11 −4 Original line number Diff line number Diff line Loading @@ -142,13 +142,17 @@ public final class WebViewFactory { public static int loadWebViewNativeLibraryFromPackage(String packageName, ClassLoader clazzLoader) { int ret = waitForProviderAndSetPackageInfo(); if (ret != LIBLOAD_SUCCESS) { if (ret != LIBLOAD_SUCCESS && ret != LIBLOAD_FAILED_WAITING_FOR_RELRO) { return ret; } if (!sPackageInfo.packageName.equals(packageName)) return LIBLOAD_WRONG_PACKAGE_NAME; return loadNativeLibrary(clazzLoader); int loadNativeRet = loadNativeLibrary(clazzLoader); // If we failed waiting for relro we want to return that fact even if we successfully load // the relro file. if (loadNativeRet == LIBLOAD_SUCCESS) return ret; return loadNativeRet; } static WebViewFactoryProvider getProvider() { Loading Loading @@ -240,7 +244,8 @@ public final class WebViewFactory { } finally { Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW); } if (response.status != LIBLOAD_SUCCESS) { if (response.status != LIBLOAD_SUCCESS && response.status != LIBLOAD_FAILED_WAITING_FOR_RELRO) { throw new MissingWebViewPackageException("Failed to load WebView provider: " + getWebViewPreparationErrorReason(response.status)); } Loading Loading @@ -599,8 +604,10 @@ public final class WebViewFactory { try { response = getUpdateService().waitForAndGetProvider(); if (response.status == WebViewFactory.LIBLOAD_SUCCESS) if (response.status == LIBLOAD_SUCCESS || response.status == LIBLOAD_FAILED_WAITING_FOR_RELRO) { sPackageInfo = response.packageInfo; } } catch (RemoteException e) { Log.e(LOGTAG, "error waiting for relro creation", e); return LIBLOAD_FAILED_WAITING_FOR_WEBVIEW_REASON_UNKNOWN; Loading services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ public class WebViewUpdateServiceImpl { mSystemInterface = systemInterface; } private static final int WAIT_TIMEOUT_MS = 4500; // KEY_DISPATCHING_TIMEOUT is 5000. private static final int WAIT_TIMEOUT_MS = 1000; // KEY_DISPATCHING_TIMEOUT is 5000. // Keeps track of the number of running relro creations private int mNumRelroCreationsStarted = 0; Loading Loading @@ -487,6 +487,10 @@ public class WebViewUpdateServiceImpl { // Either the current relro creation isn't done yet, or the new relro creatioin // hasn't kicked off yet (the last relro creation used an out-of-date WebView). webViewStatus = WebViewFactory.LIBLOAD_FAILED_WAITING_FOR_RELRO; Slog.e(TAG, "Timed out waiting for relro creation, relros started " + mNumRelroCreationsStarted + " relros finished " + mNumRelroCreationsFinished + " package dirty? " + mWebViewPackageDirty); } } if (!webViewReady) Slog.w(TAG, "creating relro file timed out"); Loading Loading
core/java/android/webkit/WebViewFactory.java +11 −4 Original line number Diff line number Diff line Loading @@ -142,13 +142,17 @@ public final class WebViewFactory { public static int loadWebViewNativeLibraryFromPackage(String packageName, ClassLoader clazzLoader) { int ret = waitForProviderAndSetPackageInfo(); if (ret != LIBLOAD_SUCCESS) { if (ret != LIBLOAD_SUCCESS && ret != LIBLOAD_FAILED_WAITING_FOR_RELRO) { return ret; } if (!sPackageInfo.packageName.equals(packageName)) return LIBLOAD_WRONG_PACKAGE_NAME; return loadNativeLibrary(clazzLoader); int loadNativeRet = loadNativeLibrary(clazzLoader); // If we failed waiting for relro we want to return that fact even if we successfully load // the relro file. if (loadNativeRet == LIBLOAD_SUCCESS) return ret; return loadNativeRet; } static WebViewFactoryProvider getProvider() { Loading Loading @@ -240,7 +244,8 @@ public final class WebViewFactory { } finally { Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW); } if (response.status != LIBLOAD_SUCCESS) { if (response.status != LIBLOAD_SUCCESS && response.status != LIBLOAD_FAILED_WAITING_FOR_RELRO) { throw new MissingWebViewPackageException("Failed to load WebView provider: " + getWebViewPreparationErrorReason(response.status)); } Loading Loading @@ -599,8 +604,10 @@ public final class WebViewFactory { try { response = getUpdateService().waitForAndGetProvider(); if (response.status == WebViewFactory.LIBLOAD_SUCCESS) if (response.status == LIBLOAD_SUCCESS || response.status == LIBLOAD_FAILED_WAITING_FOR_RELRO) { sPackageInfo = response.packageInfo; } } catch (RemoteException e) { Log.e(LOGTAG, "error waiting for relro creation", e); return LIBLOAD_FAILED_WAITING_FOR_WEBVIEW_REASON_UNKNOWN; Loading
services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ public class WebViewUpdateServiceImpl { mSystemInterface = systemInterface; } private static final int WAIT_TIMEOUT_MS = 4500; // KEY_DISPATCHING_TIMEOUT is 5000. private static final int WAIT_TIMEOUT_MS = 1000; // KEY_DISPATCHING_TIMEOUT is 5000. // Keeps track of the number of running relro creations private int mNumRelroCreationsStarted = 0; Loading Loading @@ -487,6 +487,10 @@ public class WebViewUpdateServiceImpl { // Either the current relro creation isn't done yet, or the new relro creatioin // hasn't kicked off yet (the last relro creation used an out-of-date WebView). webViewStatus = WebViewFactory.LIBLOAD_FAILED_WAITING_FOR_RELRO; Slog.e(TAG, "Timed out waiting for relro creation, relros started " + mNumRelroCreationsStarted + " relros finished " + mNumRelroCreationsFinished + " package dirty? " + mWebViewPackageDirty); } } if (!webViewReady) Slog.w(TAG, "creating relro file timed out"); Loading