зеркало из https://github.com/mozilla/gecko-dev.git
Bug 656354 - Guard against null pointer dereference in nsDocShell::SetDocCurrentStateObject. r=sicking
--HG-- extra : rebase_source : 74ea820470f5bf8f11d9d61ecfa7dc93207fa3fc
This commit is contained in:
Родитель
926b98c09a
Коммит
16b82d4db6
|
@ -7756,8 +7756,12 @@ nsDocShell::SetDocCurrentStateObj(nsISHEntry *shEntry)
|
|||
NS_ENSURE_TRUE(document, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIStructuredCloneContainer> scContainer;
|
||||
nsresult rv = shEntry->GetStateData(getter_AddRefs(scContainer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (shEntry) {
|
||||
nsresult rv = shEntry->GetStateData(getter_AddRefs(scContainer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// If shEntry is null, just set the document's state object to null.
|
||||
}
|
||||
|
||||
// It's OK for scContainer too be null here; that just means there's no
|
||||
// state data associated with this history entry.
|
||||
|
|
Загрузка…
Ссылка в новой задаче