kernel/eka/memmodel/epoc/flexible/mmu/mcodepaging.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
--- a/kernel/eka/memmodel/epoc/flexible/mmu/mcodepaging.cpp	Tue Aug 31 16:34:26 2010 +0300
+++ b/kernel/eka/memmodel/epoc/flexible/mmu/mcodepaging.cpp	Wed Sep 01 12:34:56 2010 +0100
@@ -298,17 +298,31 @@
 												(TAny*)info.iCodeLocalDrive,
 												(TAny*)&message);
 
-		r = ThePager.EmbedErrorContext(EPagingErrorContextCodeRead, bufferStart); 
-		if(r<0)
+		if(bufferStart<0)
+			{
+			r = bufferStart; // return error
+			__NK_ASSERT_DEBUG(0);
 			break;
+			}
 
 		TLinAddr data = aRequest->Buffer() + bufferStart;
 		r = Decompress(info.iCompressionType, linAddr, decompressedSize, data, dataSize);
-		if (r >= 0)
-			r = (r == decompressedSize) ? KErrNone : KErrCorrupt;
-		if(r != KErrNone)
-			__KTRACE_OPT(KPANIC, Kern::Printf("DCodePagedMemoryManager::ReadPage: error decompressing page at %08x + %x: %d", dataOffset, dataSize, r));
-		r = ThePager.EmbedErrorContext(EPagingErrorContextCodeDecompress, r); 			
+		if(r>=0)
+			{
+			if(r!=decompressedSize)
+				{
+				__KTRACE_OPT(KPANIC, Kern::Printf("DCodePagedMemoryManager::ReadPage: error decompressing page at %08x + %x: %d", dataOffset, dataSize, r));
+				__NK_ASSERT_DEBUG(0);
+				r = KErrCorrupt;
+				}
+			else
+				r = KErrNone;
+			}
+		else
+			{
+			__NK_ASSERT_DEBUG(0);
+			}
+
 		if(r!=KErrNone)
 			break;