Bug 1685883 - building with --disable-marionette fails with compile error r=keeler,whimboo,smaug

building firefox 84.0.2 from source (https://archive.mozilla.org/pub/firefox/releases/84.0.2/source/) fails when using `ac_add_options --disable-marionette` because of missing header

Differential Revision: https://phabricator.services.mozilla.com/D101390
This commit is contained in:
Horst 2021-03-04 11:56:54 +00:00
parent 7f8445df7f
commit 9c2c4d3a52
3 changed files with 11 additions and 3 deletions

View File

@ -71,7 +71,9 @@
#include "nsICookieManager.h"
#include "nsICookieService.h"
#include "nsIHttpChannel.h"
#include "nsIMarionette.h"
#ifdef ENABLE_MARIONETTE
# include "nsIMarionette.h"
#endif
#include "nsStreamUtils.h"
#include "WidgetUtils.h"
#include "nsIScriptError.h"
@ -2164,10 +2166,12 @@ webgpu::Instance* Navigator::Gpu() {
bool Navigator::Webdriver() {
bool marionetteRunning = false;
#ifdef ENABLE_MARIONETTE
nsCOMPtr<nsIMarionette> marionette = do_GetService(NS_MARIONETTE_CONTRACTID);
if (marionette) {
marionette->GetRunning(&marionetteRunning);
}
#endif
return marionetteRunning;
}

View File

@ -18,7 +18,9 @@
#include "nsAppDirectoryServiceDefs.h"
#include "nsCRT.h"
#include "nsILineInputStream.h"
#include "nsIMarionette.h"
#ifdef ENABLE_MARIONETTE
# include "nsIMarionette.h"
#endif
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIOutputStream.h"
@ -723,10 +725,12 @@ static bool IsDebugger() {
bool marionetteRunning = false;
bool remoteAgentListening = false;
#ifdef ENABLE_MARIONETTE
nsCOMPtr<nsIMarionette> marionette = do_GetService(NS_MARIONETTE_CONTRACTID);
if (marionette) {
marionette->GetRunning(&marionetteRunning);
}
#endif
#ifdef ENABLE_REMOTE_AGENT
nsCOMPtr<nsIRemoteAgent> agent = do_GetService(NS_REMOTEAGENT_CONTRACTID);

View File

@ -1098,7 +1098,7 @@ def marionette(value):
set_config("ENABLE_MARIONETTE", marionette)
set_define("ENABLE_MARIONETTE", marionette)
# geckodriver WebDriver implementation
# ==============================================================