PRUint32 readlen; char* buffer = (char*) PR_Malloc(aLength);
if(mAbort) { PRUint32 magicNumber = 0; nsCOMPtr<nsISupportsPRUint32> container = do_QueryInterface(aContext); if (container) container->GetData(&magicNumber);  if (magicNumber != MAGIC_REQUEST_CONTEXT) {  mAbort = PR_FALSE; return NS_BINDING_ABORTED; } }
nsPluginCacheListener::OnDataAvailable(nsIRequest *request, nsISupports* ctxt,                                        nsIInputStream* aIStream,                                        PRUint32 sourceOffset,                                        PRUint32 aLength){  PRUint32 readlen;  char* buffer = (char*) PR_Malloc(aLength);  // if we don't read from the stream, OnStopRequest will never be called  if(!buffer)    return NS_ERROR_OUT_OF_MEMORY;  nsresult rv = aIStream->Read(buffer, aLength, &readlen);  NS_ASSERTION(aLength == readlen, "nsCacheListener->OnDataAvailable: "               "readlen != aLength");  PR_Free(buffer);  return rv;}