зеркало из https://github.com/mozilla/gecko-dev.git
Make unknown about: URIs throw the right error instead of silently doing
nothing. Bug 87513, r=biesi, sr=darin
This commit is contained in:
Родитель
5abb3b2c19
Коммит
3f3613d27c
|
@ -47,6 +47,7 @@
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsNetCID.h"
|
#include "nsNetCID.h"
|
||||||
#include "nsAboutProtocolUtils.h"
|
#include "nsAboutProtocolUtils.h"
|
||||||
|
#include "nsNetError.h"
|
||||||
|
|
||||||
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
||||||
|
|
||||||
|
@ -152,6 +153,12 @@ nsAboutProtocolHandler::NewChannel(nsIURI* uri, nsIChannel* *result)
|
||||||
|
|
||||||
// mumble...
|
// mumble...
|
||||||
|
|
||||||
|
if (rv == NS_ERROR_FACTORY_NOT_REGISTERED) {
|
||||||
|
// This looks like an about: we don't know about. Convert
|
||||||
|
// this to an invalid URI error.
|
||||||
|
rv = NS_ERROR_MALFORMED_URI;
|
||||||
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче