зеркало из https://github.com/mozilla/gecko-dev.git
bug 1116382 reuse some UTF8toUTF16 code r=bholley
--HG-- extra : rebase_source : 7d8ee725dcfb1b40ee6d975c0746a8bdff1b5683
This commit is contained in:
Родитель
72f7f38b47
Коммит
c4cb17e0b1
|
@ -1193,9 +1193,8 @@ nsresult HTMLMediaElement::LoadResource()
|
||||||
nsRefPtr<DOMMediaStream> stream;
|
nsRefPtr<DOMMediaStream> stream;
|
||||||
rv = NS_GetStreamForMediaStreamURI(mLoadingSrc, getter_AddRefs(stream));
|
rv = NS_GetStreamForMediaStreamURI(mLoadingSrc, getter_AddRefs(stream));
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
nsCString specUTF8;
|
nsAutoString spec;
|
||||||
mLoadingSrc->GetSpec(specUTF8);
|
GetCurrentSrc(spec);
|
||||||
NS_ConvertUTF8toUTF16 spec(specUTF8);
|
|
||||||
const char16_t* params[] = { spec.get() };
|
const char16_t* params[] = { spec.get() };
|
||||||
ReportLoadError("MediaLoadInvalidURI", params, ArrayLength(params));
|
ReportLoadError("MediaLoadInvalidURI", params, ArrayLength(params));
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -1208,9 +1207,8 @@ nsresult HTMLMediaElement::LoadResource()
|
||||||
nsRefPtr<MediaSource> source;
|
nsRefPtr<MediaSource> source;
|
||||||
rv = NS_GetSourceForMediaSourceURI(mLoadingSrc, getter_AddRefs(source));
|
rv = NS_GetSourceForMediaSourceURI(mLoadingSrc, getter_AddRefs(source));
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
nsCString specUTF8;
|
nsAutoString spec;
|
||||||
mLoadingSrc->GetSpec(specUTF8);
|
GetCurrentSrc(spec);
|
||||||
NS_ConvertUTF8toUTF16 spec(specUTF8);
|
|
||||||
const char16_t* params[] = { spec.get() };
|
const char16_t* params[] = { spec.get() };
|
||||||
ReportLoadError("MediaLoadInvalidURI", params, ArrayLength(params));
|
ReportLoadError("MediaLoadInvalidURI", params, ArrayLength(params));
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче