зеркало из https://github.com/mozilla/pjs.git
Bug 406541 - Followup - Handle failed URI creation, fix typo. r=bzbarsky
This commit is contained in:
Родитель
4dec8c9820
Коммит
70d0ad2434
|
@ -86,7 +86,7 @@ interface nsIObjectLoadingContent : nsISupports
|
|||
* account. The MIME type is required as some plugins (java) calculate
|
||||
* this differently.
|
||||
*/
|
||||
nsIURI GetObjectBaseURI(in ACString aMimeType);
|
||||
nsIURI getObjectBaseURI(in ACString aMimeType);
|
||||
|
||||
/**
|
||||
* Returns the plugin instance if it has already been instantiated. This
|
||||
|
|
|
@ -1871,9 +1871,18 @@ nsObjectLoadingContent::GetObjectBaseURI(const nsACString & aMimeType, nsIURI**
|
|||
codebase.AssignLiteral("/");
|
||||
}
|
||||
|
||||
nsContentUtils::NewURIWithDocumentCharset(aURI, codebase,
|
||||
thisContent->OwnerDoc(),
|
||||
baseURI);
|
||||
if (!codebase.IsEmpty()) {
|
||||
nsresult rv = nsContentUtils::NewURIWithDocumentCharset(aURI, codebase,
|
||||
thisContent->OwnerDoc(),
|
||||
baseURI);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
return rv;
|
||||
NS_WARNING("GetObjectBaseURI: Could not resolve plugin's codebase to a URI, using baseURI instead");
|
||||
}
|
||||
|
||||
// Codebase empty or build URI failed, just use baseURI
|
||||
*aURI = NULL;
|
||||
baseURI.swap(*aURI);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче