Relanding Necko Changes.
Revising nsIChannel to allow for overlapped i/o. This consists of three parts: 1. Factoring nsIChannel into a protocol specific part, the nsIChannel, and a socket specific, the nsITransport. 2. Derive the nsIChannel from a nsIRequest. 2. Changes the notification system from necko and the URILoader to pass the nsIRequest interface instead of nsIChannel interface. This goal stems from wanting to be able to have active AsyncRead and AsyncWrite operations on nsSocketTransport. This is desired because it would greatly simplify the task of maintaining persistent/reusable socket connections for FTP, HTTP, and Imap (and potentially other protocols). The problem with the existing nsIChannel interface is that it does not allow one to selectively suspend just one of the read or write operations while keeping the other active. r=darin@netscape.com sr=rpotts@netscape.com git-svn-id: svn://10.0.0.236/trunk@87587 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -596,33 +596,35 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
|
||||
|
||||
nsCOMPtr<nsIFile> file;
|
||||
rv = fileChannel->GetFile(getter_AddRefs(file));
|
||||
if (NS_FAILED(rv)) { return rv; }
|
||||
// if we failed to get a last modification date, then we don't want to necessarily
|
||||
// fail to create a document for this file. Just don't set the last modified date on it...
|
||||
rv = file->GetLastModificationDate(&modDate);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
PRExplodedTime prtime;
|
||||
char buf[100];
|
||||
PRInt64 intermediateValue;
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
// if we failed to get a last modification date, then we don't want to necessarily
|
||||
// fail to create a document for this file. Just don't set the last modified date on it...
|
||||
rv = file->GetLastModificationDate(&modDate);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
PRExplodedTime prtime;
|
||||
char buf[100];
|
||||
PRInt64 intermediateValue;
|
||||
|
||||
LL_I2L(intermediateValue, PR_USEC_PER_MSEC);
|
||||
LL_MUL(usecs, modDate, intermediateValue);
|
||||
PR_ExplodeTime(usecs, PR_LocalTimeParameters, &prtime);
|
||||
LL_I2L(intermediateValue, PR_USEC_PER_MSEC);
|
||||
LL_MUL(usecs, modDate, intermediateValue);
|
||||
PR_ExplodeTime(usecs, PR_LocalTimeParameters, &prtime);
|
||||
|
||||
// Use '%#c' for windows, because '%c' is backward-compatible and
|
||||
// non-y2k with msvc; '%#c' requests that a full year be used in the
|
||||
// result string. Other OSes just use "%c".
|
||||
PR_FormatTime(buf, sizeof buf,
|
||||
#if defined(XP_PC) && !defined(XP_OS2)
|
||||
"%#c",
|
||||
#else
|
||||
"%c",
|
||||
#endif
|
||||
&prtime);
|
||||
lastModified.AssignWithConversion(buf);
|
||||
SetLastModified(lastModified);
|
||||
}
|
||||
// Use '%#c' for windows, because '%c' is backward-compatible and
|
||||
// non-y2k with msvc; '%#c' requests that a full year be used in the
|
||||
// result string. Other OSes just use "%c".
|
||||
PR_FormatTime(buf, sizeof buf,
|
||||
#if defined(XP_PC) && !defined(XP_OS2)
|
||||
"%#c",
|
||||
#else
|
||||
"%c",
|
||||
#endif
|
||||
&prtime);
|
||||
lastModified.AssignWithConversion(buf);
|
||||
SetLastModified(lastModified);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
Reference in New Issue
Block a user