mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
Bug 32702: GetHistoryState works as expected now - check for success, r=nisheeth
This commit is contained in:
parent
18ca13c753
commit
5e8273ffd7
@ -1983,7 +1983,7 @@ nsGenericHTMLElement::GetPrimaryPresState(nsIHTMLContent* aContent,
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsILayoutHistoryState> history;
|
||||
result = presShell->GetHistoryState(getter_AddRefs(history));
|
||||
if (history) {
|
||||
if (NS_SUCCEEDED(result) && history) {
|
||||
PRUint32 ID;
|
||||
aContent->GetContentID(&ID);
|
||||
result = history->GetState(ID, aPresState, aStateType);
|
||||
|
@ -1983,7 +1983,7 @@ nsGenericHTMLElement::GetPrimaryPresState(nsIHTMLContent* aContent,
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsILayoutHistoryState> history;
|
||||
result = presShell->GetHistoryState(getter_AddRefs(history));
|
||||
if (history) {
|
||||
if (NS_SUCCEEDED(result) && history) {
|
||||
PRUint32 ID;
|
||||
aContent->GetContentID(&ID);
|
||||
result = history->GetState(ID, aPresState, aStateType);
|
||||
|
Loading…
Reference in New Issue
Block a user