mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 830439: Add error-check for previously-ignored nsresult value in nsWebBrowserFind::GetSearchLimits(). r=mats
This commit is contained in:
parent
b93e607197
commit
127a54e170
@ -499,12 +499,15 @@ nsWebBrowserFind::GetSearchLimits(nsIDOMRange* aSearchRange,
|
||||
// There is a selection.
|
||||
int32_t count = -1;
|
||||
nsresult rv = aSel->GetRangeCount(&count);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (count < 1)
|
||||
return SetRangeAroundDocument(aSearchRange, aStartPt, aEndPt, aDoc);
|
||||
|
||||
// Need bodyNode, for the start/end of the document
|
||||
nsCOMPtr<nsIDOMNode> bodyNode;
|
||||
rv = GetRootNode(aDoc, getter_AddRefs(bodyNode));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> bodyContent (do_QueryInterface(bodyNode));
|
||||
NS_ENSURE_ARG_POINTER(bodyContent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user