firefox/D224089.patch

35 lines
1.3 KiB
Diff

diff --git a/browser/components/shell/nsGNOMEShellSearchProvider.cpp b/browser/components/shell/nsGNOMEShellSearchProvider.cpp
--- a/browser/components/shell/nsGNOMEShellSearchProvider.cpp
+++ b/browser/components/shell/nsGNOMEShellSearchProvider.cpp
@@ -421,10 +421,11 @@
}
// Send (as) rearch result reply
void nsGNOMEShellHistorySearchResult::HandleSearchResultReply() {
MOZ_ASSERT(mReply);
+ MOZ_ASSERT(mHistResultContainer);
GVariantBuilder b;
g_variant_builder_init(&b, G_VARIANT_TYPE("as"));
uint32_t childCount = 0;
@@ -484,14 +485,16 @@
void nsGNOMEShellHistorySearchResult::ReceiveSearchResultContainer(
nsCOMPtr<nsINavHistoryContainerResultNode> aHistResultContainer) {
// Propagate search results to nsGNOMEShellSearchProvider.
// SetSearchResult() checks this is up-to-date search (our time stamp matches
// latest requested search timestamp).
- if (mSearchProvider->SetSearchResult(this)) {
- mHistResultContainer = aHistResultContainer;
+ if (!mSearchProvider->SetSearchResult(this)) {
+ return;
}
+ mHistResultContainer = aHistResultContainer;
+
// Getting the currently open tabs to mark them accordingly
nsresult rv;
nsCOMPtr<nsIOpenTabsProvider> provider =
do_ImportESModule("resource:///modules/OpenTabsProvider.sys.mjs", &rv);
if (NS_FAILED(rv)) {