#551: M1538402 M1516325 M1544670

This commit is contained in:
Cameron Kaiser 2019-05-06 18:38:22 -07:00
parent aaa5809fd3
commit a5f18b5804
7 changed files with 8 additions and 11 deletions

View File

@ -436,8 +436,9 @@ private:
{
// NS_IF_RELEASE because we might have been unlinked before
nsISupports* ptr = GetISupports();
NS_IF_RELEASE(ptr);
// Clear mPtrBits before the release to prevent reentrance.
mPtrBits = 0;
NS_IF_RELEASE(ptr);
}
uintptr_t mPtrBits;

View File

@ -853,7 +853,7 @@ nsFind::ResetAll()
// Take nodes out of the tree with NextNode, until null (NextNode will return 0
// at the end of our range).
NS_IMETHODIMP
nsFind::Find(const char16_t* aPatText, nsIDOMRange* aSearchRange,
nsFind::Find(const nsAString& aPatText, nsIDOMRange* aSearchRange,
nsIDOMRange* aStartPoint, nsIDOMRange* aEndPoint,
nsIDOMRange** aRangeRet)
{
@ -870,10 +870,6 @@ nsFind::Find(const char16_t* aPatText, nsIDOMRange* aSearchRange,
NS_ENSURE_ARG_POINTER(aRangeRet);
*aRangeRet = 0;
if (!aPatText) {
return NS_ERROR_NULL_POINTER;
}
ResetAll();
nsAutoString patAutoStr(aPatText);

View File

@ -34,6 +34,6 @@ interface nsIFind : nsISupports
* end (forward) or start (backward).
* @retval A range spanning the match that was found (or null).
*/
nsIDOMRange Find(in wstring aPatText, in nsIDOMRange aSearchRange,
nsIDOMRange Find(in AString aPatText, in nsIDOMRange aSearchRange,
in nsIDOMRange aStartPoint, in nsIDOMRange aEndPoint);
};

View File

@ -756,7 +756,7 @@ nsWebBrowserFind::SearchInFrame(nsIDOMWindow* aWindow, bool aWrapping,
NS_ENSURE_SUCCESS(rv, rv);
rv = find->Find(mSearchString.get(), searchRange, startPt, endPt,
rv = find->Find(mSearchString, searchRange, startPt, endPt,
getter_AddRefs(foundRange));
if (NS_SUCCEEDED(rv) && foundRange) {

2
nsprpub/configure vendored
View File

@ -6543,7 +6543,7 @@ fi
fi
AS='$(CC) -x assembler-with-cpp'
CFLAGS="$CFLAGS -Wall -fno-common"
CFLAGS="$CFLAGS -Wall -fno-common -DFD_SETSIZE=10240 -D_DARWIN_UNLIMITED_SELECT"
case "${target_cpu}" in
arm*)
CPU_ARCH=arm

View File

@ -1364,7 +1364,7 @@ case "$target" in
AC_DEFINE(HAVE_BSD_FLOCK)
AC_DEFINE(HAVE_SOCKLEN_T)
AS='$(CC) -x assembler-with-cpp'
CFLAGS="$CFLAGS -Wall -fno-common"
CFLAGS="$CFLAGS -Wall -fno-common -DFD_SETSIZE=10240 -D_DARWIN_UNLIMITED_SELECT"
case "${target_cpu}" in
arm*)
CPU_ARCH=arm

View File

@ -396,7 +396,7 @@ nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell, bool aIsLinksOnly,
while (true) { // ----- Outer while loop: go through all docs -----
while (true) { // === Inner while loop: go through a single doc ===
mFind->Find(mTypeAheadBuffer.get(), mSearchRange, mStartPointRange,
mFind->Find(mTypeAheadBuffer, mSearchRange, mStartPointRange,
mEndPointRange, getter_AddRefs(returnRange));
if (!returnRange)