зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1302189 - [1.2] Release native zip only on finalize to prevent premature unmapping of referenced memory. r=kats
This commit is contained in:
Родитель
7e70cbbbe1
Коммит
c8d15524ab
|
@ -26,8 +26,8 @@ class ByteBufferInputStream extends InputStream {
|
|||
|
||||
@Override
|
||||
public void close() {
|
||||
mBuf = null;
|
||||
mNativeRef.release();
|
||||
// Do nothing, we need to keep the native references around for child
|
||||
// buffers.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,10 +38,6 @@ public class NativeZip implements NativeReference {
|
|||
release();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
if (mObj != 0) {
|
||||
|
|
|
@ -66,9 +66,6 @@ public final class GeckoJarReader {
|
|||
Log.e(LOGTAG, "Error closing stream", ex);
|
||||
}
|
||||
}
|
||||
if (zip != null) {
|
||||
zip.close();
|
||||
}
|
||||
}
|
||||
|
||||
return bitmap;
|
||||
|
@ -97,9 +94,6 @@ public final class GeckoJarReader {
|
|||
Log.e(LOGTAG, "Error closing reader", ex);
|
||||
}
|
||||
}
|
||||
if (zip != null) {
|
||||
zip.close();
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
|
|
Загрузка…
Ссылка в новой задаче