diff options
| author | Gustav Sennton <gsennton@google.com> | 2016-05-24 10:39:31 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-05-24 10:39:32 +0000 |
| commit | a2fbfbce9ef09ed7a98222e67709aa086e548c79 (patch) | |
| tree | 04a97aae70f5d1c0cf2ad44ee9824c43e4f31f99 /core/java | |
| parent | d954c6368fc6e591385e608fa6ebb42dc7606074 (diff) | |
| parent | fd07efa44e1337f9b573d977cd3e8d701af8fe48 (diff) | |
Merge "Load WebView even if WebView relro creation times out." into nyc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/webkit/WebViewFactory.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java index 5db0f1659871..2d1e0bd30590 100644 --- a/core/java/android/webkit/WebViewFactory.java +++ b/core/java/android/webkit/WebViewFactory.java @@ -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() { @@ -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)); } @@ -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; |
