зеркало из https://github.com/mozilla/gecko-dev.git
Bug 662094: Don't call nsContentUtils::SplitURIAtHash on null nsDocShell::mCurrentURI, to fix spammed NS_ENSURE_* warning at startup. r=bz
This commit is contained in:
Родитель
b69ee7e4a8
Коммит
755ca82740
|
@ -8285,12 +8285,13 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||
aLoadType == LOAD_LINK) {
|
||||
|
||||
// Split mCurrentURI and aURI on the '#' character. Make sure we read
|
||||
// the return values of SplitURIAtHash; it might fail because
|
||||
// mCurrentURI is null, for instance, and we don't want to allow a
|
||||
// short-circuited navigation in that case.
|
||||
// the return values of SplitURIAtHash; if it fails, we don't want to
|
||||
// allow a short-circuited navigation.
|
||||
nsCAutoString curBeforeHash, curHash, newBeforeHash, newHash;
|
||||
nsresult splitRv1, splitRv2;
|
||||
splitRv1 = nsContentUtils::SplitURIAtHash(mCurrentURI, curBeforeHash, curHash);
|
||||
splitRv1 = mCurrentURI ?
|
||||
nsContentUtils::SplitURIAtHash(mCurrentURI,
|
||||
curBeforeHash, curHash) : NS_OK;
|
||||
splitRv2 = nsContentUtils::SplitURIAtHash(aURI, newBeforeHash, newHash);
|
||||
|
||||
PRBool sameExceptHashes = NS_SUCCEEDED(splitRv1) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче