diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 5b6cc816ed1..e8cefd75f83 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -119,11 +119,8 @@ nsJARInputThunk::EnsureJarStream() getter_AddRefs(mJarStream)); if (NS_FAILED(rv)) return rv; - // ask the zip entry for the content length - nsCOMPtr entry; - mJarReader->GetEntry(mJarEntry.get(), getter_AddRefs(entry)); - if (entry) - entry->GetRealSize((PRUint32 *) &mContentLength); + // ask the JarStream for the content length + mJarStream->Available((PRUint32 *) &mContentLength); return NS_OK; } diff --git a/netwerk/protocol/jar/src/nsJARChannel.cpp b/netwerk/protocol/jar/src/nsJARChannel.cpp index 5b6cc816ed1..e8cefd75f83 100644 --- a/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -119,11 +119,8 @@ nsJARInputThunk::EnsureJarStream() getter_AddRefs(mJarStream)); if (NS_FAILED(rv)) return rv; - // ask the zip entry for the content length - nsCOMPtr entry; - mJarReader->GetEntry(mJarEntry.get(), getter_AddRefs(entry)); - if (entry) - entry->GetRealSize((PRUint32 *) &mContentLength); + // ask the JarStream for the content length + mJarStream->Available((PRUint32 *) &mContentLength); return NS_OK; }