OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.base.library_loader; | 5 package org.chromium.base.library_loader; |
6 | 6 |
7 import android.os.Bundle; | 7 import android.os.Bundle; |
8 import android.os.Parcel; | 8 import android.os.Parcel; |
9 | 9 |
10 import org.chromium.base.Log; | 10 import org.chromium.base.Log; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 Log.w(TAG, "Low-memory device: shared RELROs used in all pro
cesses"); | 106 Log.w(TAG, "Low-memory device: shared RELROs used in all pro
cesses"); |
107 } else { | 107 } else { |
108 mBrowserUsesSharedRelro = false; | 108 mBrowserUsesSharedRelro = false; |
109 } | 109 } |
110 break; | 110 break; |
111 case BROWSER_SHARED_RELRO_CONFIG_ALWAYS: | 111 case BROWSER_SHARED_RELRO_CONFIG_ALWAYS: |
112 Log.w(TAG, "Beware: shared RELROs used in all processes!"); | 112 Log.w(TAG, "Beware: shared RELROs used in all processes!"); |
113 mBrowserUsesSharedRelro = true; | 113 mBrowserUsesSharedRelro = true; |
114 break; | 114 break; |
115 default: | 115 default: |
116 assert false : "Unreached"; | 116 Log.wtf(TAG, "FATAL: illegal shared RELRO config"); |
117 break; | 117 throw new AssertionError(); |
118 } | 118 } |
119 | 119 |
120 mInitialized = true; | 120 mInitialized = true; |
121 } | 121 } |
122 | 122 |
123 /** | 123 /** |
124 * Call this method to determine if the linker will try to use shared RELROs | 124 * Call this method to determine if the linker will try to use shared RELROs |
125 * for the browser process. | 125 * for the browser process. |
126 */ | 126 */ |
127 @Override | 127 @Override |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 /** | 630 /** |
631 * Native method used to use a shared RELRO section. | 631 * Native method used to use a shared RELRO section. |
632 * | 632 * |
633 * @param library Library name. | 633 * @param library Library name. |
634 * @param libInfo A LibInfo instance containing valid RELRO information | 634 * @param libInfo A LibInfo instance containing valid RELRO information |
635 * @return true on success. | 635 * @return true on success. |
636 */ | 636 */ |
637 private static native boolean nativeUseSharedRelro(String library, | 637 private static native boolean nativeUseSharedRelro(String library, |
638 LibInfo libInfo); | 638 LibInfo libInfo); |
639 } | 639 } |
OLD | NEW |