Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 775fbff

Browse files
committed
Bug 1518551 - Remove the 'MOZ_TOOLKIT_SEARCH' build config constant, because it's unused; we always enable the search service. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D27702 --HG-- extra : moz-landing-system : lando
1 parent 921056d commit 775fbff

11 files changed

Lines changed: 9 additions & 45 deletions

File tree

docshell/base/moz.build

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,5 @@ LOCAL_INCLUDES += [
121121
'/tools/profiler',
122122
]
123123

124-
if CONFIG['MOZ_TOOLKIT_SEARCH']:
125-
DEFINES['MOZ_TOOLKIT_SEARCH'] = True
126-
127124
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
128125
CXXFLAGS += ['-Wno-error=shadow']

docshell/base/nsDefaultURIFixup.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@
1111
#include "nsIFile.h"
1212
#include <algorithm>
1313

14-
#ifdef MOZ_TOOLKIT_SEARCH
15-
# include "nsISearchService.h"
16-
#endif
17-
14+
#include "nsISearchService.h"
1815
#include "nsIURIFixup.h"
1916
#include "nsIURIMutator.h"
2017
#include "nsDefaultURIFixup.h"
@@ -429,7 +426,6 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
429426
return NS_OK;
430427
}
431428

432-
#ifdef MOZ_TOOLKIT_SEARCH
433429
// Try falling back to the search service's default search engine
434430
nsCOMPtr<nsISearchService> searchSvc =
435431
do_GetService("@mozilla.org/browser/search-service;1");
@@ -474,7 +470,6 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
474470
}
475471
}
476472
}
477-
#endif
478473

479474
// out of options
480475
return NS_ERROR_NOT_AVAILABLE;

docshell/base/nsDocShell.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
#include "nsEscape.h"
184184
#include "nsFocusManager.h"
185185
#include "nsGlobalWindow.h"
186+
#include "nsISearchService.h"
186187
#include "nsJSEnvironment.h"
187188
#include "nsNetCID.h"
188189
#include "nsNetUtil.h"
@@ -222,10 +223,6 @@
222223
# include "nsIWebBrowserPrint.h"
223224
#endif
224225

225-
#ifdef MOZ_TOOLKIT_SEARCH
226-
# include "nsISearchService.h"
227-
#endif
228-
229226
using namespace mozilla;
230227
using namespace mozilla::dom;
231228
using namespace mozilla::net;
@@ -13229,7 +13226,6 @@ void nsDocShell::MaybeNotifyKeywordSearchLoading(const nsString& aProvider,
1322913226
return;
1323013227
}
1323113228

13232-
#ifdef MOZ_TOOLKIT_SEARCH
1323313229
nsCOMPtr<nsISearchService> searchSvc =
1323413230
do_GetService("@mozilla.org/browser/search-service;1");
1323513231
if (searchSvc) {
@@ -13244,7 +13240,6 @@ void nsDocShell::MaybeNotifyKeywordSearchLoading(const nsString& aProvider,
1324413240
}
1324513241
}
1324613242
}
13247-
#endif
1324813243
}
1324913244

1325013245
NS_IMETHODIMP

dom/ipc/ContentParent.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
#include "nsIRemoteWindowContext.h"
164164
#include "nsIScriptError.h"
165165
#include "nsIScriptSecurityManager.h"
166+
#include "nsISearchService.h"
166167
#include "nsIServiceWorkerManager.h"
167168
#include "nsISiteSecurityService.h"
168169
#include "nsISound.h"
@@ -274,10 +275,6 @@
274275
# endif
275276
#endif
276277

277-
#ifdef MOZ_TOOLKIT_SEARCH
278-
# include "nsISearchService.h"
279-
#endif
280-
281278
#ifdef XP_WIN
282279
# include "mozilla/audio/AudioNotificationSender.h"
283280
# include "mozilla/widget/AudioSession.h"
@@ -4198,7 +4195,6 @@ mozilla::ipc::IPCResult ContentParent::RecvKeywordToURI(
41984195

41994196
mozilla::ipc::IPCResult ContentParent::RecvNotifyKeywordSearchLoading(
42004197
const nsString& aProvider, const nsString& aKeyword) {
4201-
#ifdef MOZ_TOOLKIT_SEARCH
42024198
nsCOMPtr<nsISearchService> searchSvc =
42034199
do_GetService("@mozilla.org/browser/search-service;1");
42044200
if (searchSvc) {
@@ -4214,7 +4210,6 @@ mozilla::ipc::IPCResult ContentParent::RecvNotifyKeywordSearchLoading(
42144210
}
42154211
}
42164212
}
4217-
#endif
42184213
return IPC_OK();
42194214
}
42204215

dom/ipc/moz.build

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
196196
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
197197
DEFINES['MOZ_ENABLE_FREETYPE'] = True
198198

199-
if CONFIG['MOZ_TOOLKIT_SEARCH']:
200-
DEFINES['MOZ_TOOLKIT_SEARCH'] = True
201-
202199
JAR_MANIFESTS += ['jar.mn']
203200

204201
BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']

old-configure.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,6 @@ if test "$MOZ_IOS"; then
16221622
fi
16231623
MOZ_PREF_EXTENSIONS=1
16241624
MOZ_SPELLCHECK=1
1625-
MOZ_TOOLKIT_SEARCH=1
16261625
MOZ_UNIVERSALCHARDET=1
16271626
MOZ_XUL=1
16281627
MOZ_ZIPWRITER=1
@@ -2902,7 +2901,6 @@ AC_SUBST_LIST(MOZ_DEBUG_LDFLAGS)
29022901
AC_SUBST(WARNINGS_AS_ERRORS)
29032902
AC_SUBST_LIST(WARNINGS_CFLAGS)
29042903
AC_SUBST_SET(MOZ_EXTENSIONS)
2905-
AC_SUBST(MOZ_TOOLKIT_SEARCH)
29062904

29072905
AC_SUBST(MOZ_UNIVERSALCHARDET)
29082906
AC_SUBST(MOZ_SPELLCHECK)

toolkit/components/moz.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ DIRS += [
6262
'reflect',
6363
'reputationservice',
6464
'resistfingerprinting',
65+
'search',
6566
'securityreporter',
6667
'sessionstore',
6768
'shell',
@@ -95,9 +96,6 @@ if CONFIG['BUILD_CTYPES']:
9596
if CONFIG['MOZ_XUL']:
9697
DIRS += ['autocomplete', 'printingui', 'satchel']
9798

98-
if CONFIG['MOZ_TOOLKIT_SEARCH']:
99-
DIRS += ['search']
100-
10199
DIRS += ['captivedetect']
102100

103101
if CONFIG['OS_TARGET'] != 'Android':

toolkit/components/search/moz.build

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ XPCSHELL_TESTS_MANIFESTS += [
99
'tests/xpcshell/xpcshell.ini',
1010
]
1111

12-
if CONFIG['MOZ_TOOLKIT_SEARCH']:
13-
XPIDL_SOURCES += [
14-
'nsISearchService.idl',
15-
]
12+
XPIDL_SOURCES += [
13+
'nsISearchService.idl',
14+
]
1615

1716
XPIDL_MODULE = 'toolkit_search'
1817

toolkit/modules/AppConstants.jsm

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,6 @@ this.AppConstants = Object.freeze({
275275
false,
276276
#endif
277277

278-
MOZ_TOOLKIT_SEARCH:
279-
#ifdef MOZ_TOOLKIT_SEARCH
280-
true,
281-
#else
282-
false,
283-
#endif
284-
285278
MOZ_GECKO_PROFILER:
286279
#ifdef MOZ_GECKO_PROFILER
287280
true,

toolkit/modules/Services.jsm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ var initTable = {
8686
storage: ["@mozilla.org/storage/service;1", "mozIStorageService"],
8787
domStorageManager: ["@mozilla.org/dom/localStorage-manager;1", "nsIDOMStorageManager"],
8888
lsm: ["@mozilla.org/dom/localStorage-manager;1", "nsILocalStorageManager"],
89+
search: ["@mozilla.org/browser/search-service;1", "nsISearchService"],
8990
strings: ["@mozilla.org/intl/stringbundle;1", "nsIStringBundleService"],
9091
telemetry: ["@mozilla.org/base/telemetry;1", "nsITelemetry"],
9192
textToSubURI: ["@mozilla.org/intl/texttosuburi;1", "nsITextToSubURI"],
@@ -109,9 +110,6 @@ var initTable = {
109110
if (AppConstants.platform == "android") {
110111
initTable.androidBridge = ["@mozilla.org/android/bridge;1", "nsIAndroidBridge"];
111112
}
112-
if (AppConstants.MOZ_TOOLKIT_SEARCH) {
113-
initTable.search = ["@mozilla.org/browser/search-service;1", "nsISearchService"];
114-
}
115113
if (AppConstants.MOZ_GECKO_PROFILER) {
116114
initTable.profiler = ["@mozilla.org/tools/profiler;1", "nsIProfiler"];
117115
}

0 commit comments

Comments
 (0)