Fix bug 399185 -- Make image request URIs immutable so that we don't have to

clone them later.  r=jst, sr=biesi, a=vlad
This commit is contained in:
bzbarsky%mit.edu 2007-10-26 19:54:42 +00:00
Родитель 7a5dac8744
Коммит 806559d90b
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -557,6 +557,8 @@ public:
PRInt16* aImageBlockingStatus = nsnull);
/**
* Method to start an image load. This does not do any security checks.
* This method will attempt to make aURI immutable; a caller that wants to
* keep a mutable version around should pass in a clone.
*
* @param aURI uri of the image to be loaded
* @param aLoadingDocument the document we belong to

Просмотреть файл

@ -2157,6 +2157,9 @@ nsContentUtils::LoadImage(nsIURI* aURI, nsIDocument* aLoadingDocument,
nsIURI *documentURI = aLoadingDocument->GetDocumentURI();
// Make the URI immutable so people won't change it under us
NS_TryToSetImmutable(aURI);
// We don't use aLoadingPrincipal for anything here yet... but we
// will. See bug 377092.