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

Side by Side Diff: base/android/linker/linker_jni.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « base/android/java/src/org/chromium/base/SystemMessageHandler.java ('k') | base/base64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the Android-specific Chromium linker, a tiny shared library 5 // This is the Android-specific Chromium linker, a tiny shared library
6 // implementing a custom dynamic linker that can be used to load the 6 // implementing a custom dynamic linker that can be used to load the
7 // real Chromium libraries (e.g. libcontentshell.so). 7 // real Chromium libraries (e.g. libcontentshell.so).
8 8
9 // The main point of this linker is to be able to share the RELRO 9 // The main point of this linker is to be able to share the RELRO
10 // section of libcontentshell.so (or equivalent) between the browser and 10 // section of libcontentshell.so (or equivalent) between the browser and
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 jstring library_name) { 657 jstring library_name) {
658 String apkfile_name_str(env, apkfile_name); 658 String apkfile_name_str(env, apkfile_name);
659 const char* apkfile_name_c_str = apkfile_name_str.c_str(); 659 const char* apkfile_name_c_str = apkfile_name_str.c_str();
660 String library_name_str(env, library_name); 660 String library_name_str(env, library_name);
661 const char* library_name_c_str = library_name_str.c_str(); 661 const char* library_name_c_str = library_name_str.c_str();
662 662
663 LOG_INFO("%s: Checking if %s is page-aligned and uncompressed in %s\n", 663 LOG_INFO("%s: Checking if %s is page-aligned and uncompressed in %s\n",
664 __FUNCTION__, library_name_c_str, apkfile_name_c_str); 664 __FUNCTION__, library_name_c_str, apkfile_name_c_str);
665 jboolean mappable = crazy_linker_check_library_is_mappable_in_zip_file( 665 jboolean mappable = crazy_linker_check_library_is_mappable_in_zip_file(
666 apkfile_name_c_str, library_name_c_str) == CRAZY_STATUS_SUCCESS; 666 apkfile_name_c_str, library_name_c_str) == CRAZY_STATUS_SUCCESS;
667 LOG_INFO("%s: %s\n", __FUNCTION__, aligned ? "Aligned" : "NOT aligned"); 667 LOG_INFO("%s: %s\n", __FUNCTION__, mappable ? "Mappable" : "NOT mappable");
668 668
669 return mappable; 669 return mappable;
670 } 670 }
671 671
672 const JNINativeMethod kNativeMethods[] = { 672 const JNINativeMethod kNativeMethods[] = {
673 {"nativeLoadLibrary", 673 {"nativeLoadLibrary",
674 "(" 674 "("
675 "Ljava/lang/String;" 675 "Ljava/lang/String;"
676 "J" 676 "J"
677 "Lorg/chromium/base/library_loader/Linker$LibInfo;" 677 "Lorg/chromium/base/library_loader/Linker$LibInfo;"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 crazy_context_t* context = GetCrazyContext(); 786 crazy_context_t* context = GetCrazyContext();
787 crazy_context_set_java_vm(context, vm, JNI_VERSION_1_4); 787 crazy_context_set_java_vm(context, vm, JNI_VERSION_1_4);
788 788
789 // Register the function that the crazy linker can call to post code 789 // Register the function that the crazy linker can call to post code
790 // for later execution. 790 // for later execution.
791 crazy_context_set_callback_poster(context, &PostForLaterExecution, NULL); 791 crazy_context_set_callback_poster(context, &PostForLaterExecution, NULL);
792 792
793 LOG_INFO("%s: Done", __FUNCTION__); 793 LOG_INFO("%s: Done", __FUNCTION__);
794 return JNI_VERSION_1_4; 794 return JNI_VERSION_1_4;
795 } 795 }
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/SystemMessageHandler.java ('k') | base/base64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698