Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/org/adblockplus/android/ABPEngine.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Left Patch Set: Removed even more unrelated changes Created April 28, 2014, 9:42 a.m.
Right Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/org/adblockplus/ChunkedOutputStream.java ('k') | src/org/adblockplus/android/AboutDialog.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld