summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Torne (Richard Coles) <torne@google.com> 2021-09-14 14:14:06 -0400
committer Torne (Richard Coles) <torne@google.com> 2021-09-14 14:23:24 -0400
commitddd332f72beddb28a8fa3df707256c8cd35d6022 (patch)
tree137a979e14bd75ea74adf8ab4e0d39f961bf0ed2
parent0a25520f9b1c57a3251e6cb57a50c71457117ce6 (diff)
webview: make relro load failure a warning.
Failing to open the relro file when loading WebView isn't a major problem (we can still load the library, it just loses a RAM optimization), and can happen in some edge cases like when the current address space reservation was not large enough to create the file. The other messages logged from Java about this are at warning level; make this native error also a warning. The other errors in this function are entirely unexpected conditions, so leave them as errors. Fixes: 197972345 Test: n/a Change-Id: Iaf0d4a3b6e42ba93ef6782b5b9120cd69cae3002
-rw-r--r--native/webview/loader/loader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/webview/loader/loader.cpp b/native/webview/loader/loader.cpp
index 1265763d47d3..94e1e9f8b1c2 100644
--- a/native/webview/loader/loader.cpp
+++ b/native/webview/loader/loader.cpp
@@ -121,8 +121,8 @@ jint DoLoadWithRelroFile(JNIEnv* env, const char* lib, const char* relro,
jobject clazzLoader) {
int relro_fd = TEMP_FAILURE_RETRY(open(relro, O_RDONLY));
if (relro_fd == -1) {
- ALOGE("Failed to open relro file %s: %s", relro, strerror(errno));
- return LIBLOAD_FAILED_TO_OPEN_RELRO_FILE;
+ ALOGW("Failed to open relro file %s: %s", relro, strerror(errno));
+ return LIBLOAD_FAILED_TO_OPEN_RELRO_FILE;
}
android_namespace_t* ns =
android::FindNamespaceByClassLoader(env, clazzLoader);