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

Unified Diff: third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp

Issue 684163002: Library loading fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update for review feedback Created 6 years, 2 months 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
Index: third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp b/third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp
index 5804278f48b8d496c2f57d098416395b71a882c1..045eea57dfdee3452695383d04843b7fb506bb2e 100644
--- a/third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_library_list.cpp
@@ -20,7 +20,7 @@ namespace crazy {
namespace {
-// Maximum name length of a file in a zip file.
+// Maximum filename length of a file in a zip file.
rmcilroy 2014/10/29 17:20:44 filepath
petrcermak 2014/10/30 19:55:07 Done (changed to "path"). Also changed the name of
const size_t kMaxFilenameInZip = 256;
// Page size.
@@ -399,17 +399,21 @@ LibraryView* LibraryList::LoadLibrary(const char* lib_name,
#error "Unsupported target abi"
#endif
-int LibraryList::FindAlignedLibraryInZipFile(
- const char* zip_file_path,
- const char* lib_name,
- Error* error) {
+String LibraryList::GetLibraryFilenameInZipFile(const char* lib_name) {
rmcilroy 2014/10/29 17:20:44 GetLibraryFilePathInZipFile
petrcermak 2014/10/30 19:55:07 Done.
String fullname;
fullname.Reserve(kMaxFilenameInZip);
fullname = "lib/";
fullname += CURRENT_ABI;
fullname += "/crazy.";
fullname += lib_name;
+ return fullname;
+}
+int LibraryList::FindAlignedLibraryInZipFile(
+ const char* zip_file_path,
+ const char* lib_name,
+ Error* error) {
+ String fullname = GetLibraryFilenameInZipFile(lib_name);
if (fullname.size() + 1 > kMaxFilenameInZip) {
if (error) {
picksi1 2014/10/30 10:48:08 Should '+1 >' be replaced with '>=' instead? I hav
petrcermak 2014/10/30 19:55:07 Again, this if statement was removed in my previou
error->Format("Filename too long for a file in a zip file %s\n",

Powered by Google App Engine
This is Rietveld 408576698