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

Delta Between Two Patch Sets: libadblockplus-android/src/org/adblockplus/libadblockplus/android/SingleInstanceEngineProvider.java

Issue 29691582: Issue 6366 - Elemhide thread is accessing released engine (Closed)
Left Patch Set: Created Feb. 7, 2018, 1:48 p.m.
Right Patch Set: added "final" Created Feb. 7, 2018, 2:02 p.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 | « libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngineProvider.java ('k') | no next file » | 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 <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
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
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 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld