Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 24 matching lines...) Expand all Loading... | |
35 import android.content.pm.PackageManager.NameNotFoundException; | 35 import android.content.pm.PackageManager.NameNotFoundException; |
36 import android.os.Build.VERSION; | 36 import android.os.Build.VERSION; |
37 import android.util.Log; | 37 import android.util.Log; |
38 | 38 |
39 public final class ABPEngine | 39 public final class ABPEngine |
40 { | 40 { |
41 private static final String TAG = Utils.getTag(ABPEngine.class); | 41 private static final String TAG = Utils.getTag(ABPEngine.class); |
42 | 42 |
43 private final Context context; | 43 private final Context context; |
44 | 44 |
45 /** | 45 /* |
Felix Dahlke
2014/04/28 10:09:41
If this is a javadoc comment, it'll show up as the
René Jeschke
2014/04/28 10:18:34
Done.
| |
46 * The fields below are volatile because: | 46 * The fields below are volatile because: |
47 * | 47 * |
48 * I encountered JNI related bugs/crashes caused by JNI backed Java objects. I t seemed that under | 48 * I encountered JNI related bugs/crashes caused by JNI backed Java objects. I t seemed that under |
49 * certain conditions the objects were optimized away which resulted in crashe s when trying to | 49 * certain conditions the objects were optimized away which resulted in crashe s when trying to |
50 * release the object, sometimes even on access. | 50 * release the object, sometimes even on access. |
51 * | 51 * |
52 * The only solution that really worked was to declare the variables holding t he references | 52 * The only solution that really worked was to declare the variables holding t he references |
53 * volatile, this seems to prevent the JNI from 'optimizing away' those object s (as a volatile | 53 * volatile, this seems to prevent the JNI from 'optimizing away' those object s (as a volatile |
54 * variable might be changed at any time from any thread). | 54 * variable might be changed at any time from any thread). |
55 */ | 55 */ |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
272 | 272 |
273 public void updateSubscriptionStatus(final String url) | 273 public void updateSubscriptionStatus(final String url) |
274 { | 274 { |
275 final Subscription sub = this.filterEngine.getSubscription(url); | 275 final Subscription sub = this.filterEngine.getSubscription(url); |
276 if (sub != null) | 276 if (sub != null) |
277 { | 277 { |
278 Utils.updateSubscriptionStatus(this.context, sub); | 278 Utils.updateSubscriptionStatus(this.context, sub); |
279 } | 279 } |
280 } | 280 } |
281 } | 281 } |
LEFT | RIGHT |