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

Unified Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java

Issue 29536604: Issue 5556 - Update to use libadblockplus revision hg:566f64c8a2a8 (Closed) Base URL: github.com:abby-sergz/libadblockplus-android.git
Patch Set: Created Sept. 5, 2017, 12:28 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java
diff --git a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java
similarity index 88%
rename from libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java
rename to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java
index fc988be5c4d82ac6816b86909cb9f0f1f0ff01bb..2f512c2ea5a77ddec4fac9aa8fa7d180acbad844 100644
--- a/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsTest.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/tests/BaseJsEngineTest.java
@@ -27,7 +27,7 @@ import org.adblockplus.libadblockplus.WebRequest;
import android.content.Context;
import android.test.InstrumentationTestCase;
-public abstract class BaseJsTest extends InstrumentationTestCase
+public abstract class BaseJsEngineTest extends InstrumentationTestCase
{
protected JsEngine jsEngine;
@@ -40,6 +40,16 @@ public abstract class BaseJsTest extends InstrumentationTestCase
getContext().getFilesDir().getAbsolutePath());
}
+ @Override
+ protected void tearDown() throws Exception
+ {
+ if (jsEngine != null)
anton 2017/09/06 06:33:47 original GC approach assumes that when Java instan
sergei 2017/09/07 10:33:31 I think that manual disposing of JsEngine and Filt
anton 2017/09/07 11:51:13 Well, it seems to be more C++ than Java approach i
+ {
+ jsEngine.dispose();
+ jsEngine = null;
+ }
+ }
+
// If the method returns null then a default implementation of the Log System
// provided by libadblockplus is used.
protected LogSystem createLogSystem()

Powered by Google App Engine
This is Rietveld