| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 private boolean developmentBuild; | 51 private boolean developmentBuild; |
| 52 private String preloadedPreferenceName; | 52 private String preloadedPreferenceName; |
| 53 private Map<String, Integer> urlToResourceIdMap; | 53 private Map<String, Integer> urlToResourceIdMap; |
| 54 private AdblockEngine engine; | 54 private AdblockEngine engine; |
| 55 private CountDownLatch engineCreated; | 55 private CountDownLatch engineCreated; |
| 56 private Long v8IsolateProviderPtr; | 56 private Long v8IsolateProviderPtr; |
| 57 private List<EngineCreatedListener> engineCreatedListeners = | 57 private List<EngineCreatedListener> engineCreatedListeners = |
| 58 new LinkedList<EngineCreatedListener>(); | 58 new LinkedList<EngineCreatedListener>(); |
| 59 private List<EngineDisposedListener> engineDisposedListeners = | 59 private List<EngineDisposedListener> engineDisposedListeners = |
| 60 new LinkedList<EngineDisposedListener>(); | 60 new LinkedList<EngineDisposedListener>(); |
| 61 private Object engineLock = new Object(); | 61 private final Object engineLock = new Object(); |
|
diegocarloslima
2018/02/07 14:00:06
This should be final
jens
2018/02/07 14:01:23
Could be final
anton
2018/02/07 14:03:22
Acknowledged.
See patch set #3
| |
| 62 | 62 |
| 63 /* | 63 /* |
| 64 Simple ARC management for AdblockEngine | 64 Simple ARC management for AdblockEngine |
| 65 Use `retain` and `release` | 65 Use `retain` and `release` |
| 66 */ | 66 */ |
| 67 | 67 |
| 68 private AtomicInteger referenceCounter = new AtomicInteger(0); | 68 private AtomicInteger referenceCounter = new AtomicInteger(0); |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * Init with context | 71 * Init with context |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 { | 297 { |
| 298 return referenceCounter.get(); | 298 return referenceCounter.get(); |
| 299 } | 299 } |
| 300 | 300 |
| 301 @Override | 301 @Override |
| 302 public Object getEngineLock() | 302 public Object getEngineLock() |
| 303 { | 303 { |
| 304 return engineLock; | 304 return engineLock; |
| 305 } | 305 } |
| 306 } | 306 } |
| LEFT | RIGHT |