Skip to content

Commit 20df43a

Browse files
committed
Bug 1382099 - Remove MOZ_WIDGET_GONK from toolkit/. r=glandium.
--HG-- extra : rebase_source : 709744b24104b463c8dc4cbe215d2250e7c1a9f5
1 parent 537fa49 commit 20df43a

File tree

13 files changed

+16
-107
lines changed

13 files changed

+16
-107
lines changed

toolkit/components/build/nsToolkitCompsModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
#include "nsWebRequestListener.h"
4949

50-
#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID)
50+
#if !defined(MOZ_WIDGET_ANDROID)
5151
#define MOZ_HAS_TERMINATOR
5252
#endif
5353

toolkit/components/diskspacewatcher/DiskSpaceWatcher.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ static const mozilla::Module::ContractIDEntry kDiskSpaceWatcherContracts[] = {
145145
};
146146

147147
static const mozilla::Module::CategoryEntry kDiskSpaceWatcherCategories[] = {
148-
#ifdef MOZ_WIDGET_GONK
149-
{ "profile-after-change", "Disk Space Watcher Service", DISKSPACEWATCHER_CONTRACTID },
150-
#endif
151148
{ nullptr }
152149
};
153150

toolkit/components/jsdownloads/src/DownloadIntegration.jsm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ this.DownloadIntegration = {
373373
directoryPath = await this.getPreferredDownloadsDirectory();
374374
#elifdef MOZ_WIDGET_ANDROID
375375
directoryPath = await this.getSystemDownloadsDirectory();
376-
#elifdef MOZ_WIDGET_GONK
377-
directoryPath = await this.getSystemDownloadsDirectory();
378376
#else
379377
directoryPath = this._getDirectory("TmpD");
380378
#endif

toolkit/components/jsdownloads/src/DownloadPlatform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIF
102102
const nsACString& aContentType, bool aIsPrivate)
103103
{
104104
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) \
105-
|| defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GONK)
105+
|| defined(MOZ_WIDGET_GTK)
106106

107107
nsAutoString path;
108108
if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {

toolkit/components/startup/nsAppStartup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ NS_IMPL_ISUPPORTS(nsAppStartup,
241241
NS_IMETHODIMP
242242
nsAppStartup::CreateHiddenWindow()
243243
{
244-
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_UIKIT)
244+
#if defined(MOZ_WIDGET_UIKIT)
245245
return NS_OK;
246246
#else
247247
nsCOMPtr<nsIAppShellService> appShellService
@@ -256,7 +256,7 @@ nsAppStartup::CreateHiddenWindow()
256256
NS_IMETHODIMP
257257
nsAppStartup::DestroyHiddenWindow()
258258
{
259-
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_UIKIT)
259+
#if defined(MOZ_WIDGET_UIKIT)
260260
return NS_OK;
261261
#else
262262
nsCOMPtr<nsIAppShellService> appShellService

toolkit/components/windowwatcher/nsWindowWatcher.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,13 +490,6 @@ nsWindowWatcher::CreateChromeWindow(const nsACString& aFeatures,
490490
return NS_ERROR_UNEXPECTED;
491491
}
492492

493-
// B2G multi-screen support. mozDisplayId is returned from the
494-
// "display-changed" event, it is also platform-dependent.
495-
#ifdef MOZ_WIDGET_GONK
496-
int retval = WinHasOption(aFeatures, "mozDisplayId", 0, nullptr);
497-
windowCreator2->SetScreenId(retval);
498-
#endif
499-
500493
bool cancel = false;
501494
nsCOMPtr<nsIWebBrowserChrome> newWindowChrome;
502495
nsresult rv =

toolkit/crashreporter/nsExceptionHandler.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,11 +1601,9 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
16011601
if (gExceptionHandler)
16021602
return NS_ERROR_ALREADY_INITIALIZED;
16031603

1604-
#if !defined(DEBUG) || defined(MOZ_WIDGET_GONK)
1604+
#if !defined(DEBUG)
16051605
// In non-debug builds, enable the crash reporter by default, and allow
16061606
// disabling it with the MOZ_CRASHREPORTER_DISABLE environment variable.
1607-
// Also enable it by default in debug gonk builds as it is difficult to
1608-
// set environment on startup.
16091607
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
16101608
if (envvar && *envvar && !force)
16111609
return NS_OK;
@@ -1617,10 +1615,7 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
16171615
return NS_OK;
16181616
#endif
16191617

1620-
#if defined(MOZ_WIDGET_GONK)
1621-
doReport = false;
1622-
headlessClient = true;
1623-
#elif defined(XP_WIN)
1618+
#if defined(XP_WIN)
16241619
doReport = ShouldReport();
16251620
#else
16261621
// this environment variable prevents us from launching

toolkit/modules/AppConstants.jsm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ this.AppConstants = Object.freeze({
156156
"macosx",
157157
#elif MOZ_WIDGET_ANDROID
158158
"android",
159-
#elif MOZ_WIDGET_GONK
160-
"gonk",
161159
#elif XP_LINUX
162160
"linux",
163161
#else

toolkit/profile/nsProfileLock.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
#include "mozilla/Printf.h"
3131
#endif
3232

33-
#if defined(MOZ_WIDGET_GONK) && !defined(MOZ_CRASHREPORTER)
34-
#include <sys/syscall.h>
35-
#endif
36-
3733
// **********************************************************************
3834
// class nsProfileLock
3935
//
@@ -192,27 +188,6 @@ void nsProfileLock::FatalSignalHandler(int signo
192188
}
193189
}
194190

195-
#ifdef MOZ_WIDGET_GONK
196-
switch (signo) {
197-
case SIGQUIT:
198-
case SIGILL:
199-
case SIGABRT:
200-
case SIGSEGV:
201-
#ifndef MOZ_CRASHREPORTER
202-
// Retrigger the signal for those that can generate a core dump
203-
signal(signo, SIG_DFL);
204-
if (info->si_code <= 0) {
205-
if (syscall(__NR_tgkill, getpid(), syscall(__NR_gettid), signo) < 0) {
206-
break;
207-
}
208-
}
209-
#endif
210-
return;
211-
default:
212-
break;
213-
}
214-
#endif
215-
216191
// Backstop exit call, just in case.
217192
_exit(signo);
218193
}

toolkit/xre/EventTracer.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@
6666
#include <prtime.h>
6767

6868
#include "nsThreadUtils.h"
69-
#ifdef MOZ_WIDGET_GONK
70-
#include "nsIObserverService.h"
71-
#include "mozilla/Services.h"
72-
#endif
7369

7470
using mozilla::TimeDuration;
7571
using mozilla::TimeStamp;
@@ -85,31 +81,6 @@ struct TracerStartClosure {
8581
int32_t mThresholdInterval;
8682
};
8783

88-
#ifdef MOZ_WIDGET_GONK
89-
class EventLoopLagDispatcher : public Runnable
90-
{
91-
public:
92-
explicit EventLoopLagDispatcher(int aLag)
93-
: mLag(aLag) {}
94-
95-
NS_IMETHOD Run() override
96-
{
97-
nsCOMPtr<nsIObserverService> obsService =
98-
mozilla::services::GetObserverService();
99-
if (!obsService) {
100-
return NS_ERROR_FAILURE;
101-
}
102-
103-
nsAutoString value;
104-
value.AppendInt(mLag);
105-
return obsService->NotifyObservers(nullptr, "event-loop-lag", value.get());
106-
}
107-
108-
private:
109-
int mLag;
110-
};
111-
#endif
112-
11384
/*
11485
* The tracer thread fires events at the native event loop roughly
11586
* every kMeasureInterval. It will sleep to attempt not to send them
@@ -180,10 +151,6 @@ void TracerThread(void *arg)
180151
fprintf(log, "MOZ_EVENT_TRACE sample %llu %lf\n",
181152
now,
182153
duration.ToMilliseconds());
183-
#ifdef MOZ_WIDGET_GONK
184-
NS_DispatchToMainThread(
185-
new EventLoopLagDispatcher(int(duration.ToSecondsSigDigits() * 1000)));
186-
#endif
187154
}
188155

189156
if (next_sleep > duration.ToMilliseconds()) {

0 commit comments

Comments
 (0)