Bug 884004: DexClassLoader should use context's class loader. [r=kats]

--HG--
extra : rebase_source : ef88af9ee62fb357528c4116247a7f57bae70cf3
This commit is contained in:
Sriram Ramasubramanian 2013-06-17 12:55:01 -07:00
parent 2f5927340f
commit 434a4bc08b

View File

@ -90,7 +90,7 @@ class JavaAddonManager implements GeckoEventListener {
Log.d(LOGTAG, "Attempting to load classes.dex file from " + zipFile + " and instantiate " + implClass);
try {
File tmpDir = mApplicationContext.getDir("dex", 0);
DexClassLoader loader = new DexClassLoader(zipFile, tmpDir.getAbsolutePath(), null, ClassLoader.getSystemClassLoader());
DexClassLoader loader = new DexClassLoader(zipFile, tmpDir.getAbsolutePath(), null, mApplicationContext.getClassLoader());
Class<?> c = loader.loadClass(implClass);
try {
Constructor<?> constructor = c.getDeclaredConstructor(Map.class);