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
diff --git a/native/webview/loader/loader.cpp b/native/webview/loader/loader.cpp
index 1265763..94e1e9f 100644
--- a/native/webview/loader/loader.cpp
+++ b/native/webview/loader/loader.cpp
@@ -121,8 +121,8 @@
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);