зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
7a5dac8744
Коммит
806559d90b
|
@ -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.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче