mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1174857 - Propagate safemode to the child process. r=billm
This commit is contained in:
parent
7c76048c28
commit
5027a39f1e
@ -68,6 +68,7 @@
|
|||||||
#include "mozilla/unused.h"
|
#include "mozilla/unused.h"
|
||||||
|
|
||||||
#include "mozInlineSpellChecker.h"
|
#include "mozInlineSpellChecker.h"
|
||||||
|
#include "nsAppRunner.h"
|
||||||
#include "nsIConsoleListener.h"
|
#include "nsIConsoleListener.h"
|
||||||
#include "nsICycleCollectorListener.h"
|
#include "nsICycleCollectorListener.h"
|
||||||
#include "nsIDragService.h"
|
#include "nsIDragService.h"
|
||||||
@ -800,17 +801,23 @@ ContentChild::InitXPCOM()
|
|||||||
|
|
||||||
bool isOffline, isLangRTL;
|
bool isOffline, isLangRTL;
|
||||||
bool isConnected;
|
bool isConnected;
|
||||||
|
bool isSafeMode;
|
||||||
ClipboardCapabilities clipboardCaps;
|
ClipboardCapabilities clipboardCaps;
|
||||||
DomainPolicyClone domainPolicy;
|
DomainPolicyClone domainPolicy;
|
||||||
OwningSerializedStructuredCloneBuffer initialData;
|
OwningSerializedStructuredCloneBuffer initialData;
|
||||||
|
|
||||||
SendGetXPCOMProcessAttributes(&isOffline, &isConnected,
|
SendGetXPCOMProcessAttributes(&isOffline, &isConnected,
|
||||||
&isLangRTL, &mAvailableDictionaries,
|
&isLangRTL, &mAvailableDictionaries,
|
||||||
&clipboardCaps, &domainPolicy, &initialData);
|
&clipboardCaps, &domainPolicy, &initialData,
|
||||||
|
&isSafeMode);
|
||||||
RecvSetOffline(isOffline);
|
RecvSetOffline(isOffline);
|
||||||
RecvSetConnectivity(isConnected);
|
RecvSetConnectivity(isConnected);
|
||||||
RecvBidiKeyboardNotify(isLangRTL);
|
RecvBidiKeyboardNotify(isLangRTL);
|
||||||
|
|
||||||
|
if (isSafeMode) {
|
||||||
|
mozilla::startup::SetSafeMode();
|
||||||
|
}
|
||||||
|
|
||||||
// Create the CPOW manager as soon as possible.
|
// Create the CPOW manager as soon as possible.
|
||||||
SendPJavaScriptConstructor();
|
SendPJavaScriptConstructor();
|
||||||
|
|
||||||
|
@ -3218,7 +3218,8 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
|
|||||||
InfallibleTArray<nsString>* dictionaries,
|
InfallibleTArray<nsString>* dictionaries,
|
||||||
ClipboardCapabilities* clipboardCaps,
|
ClipboardCapabilities* clipboardCaps,
|
||||||
DomainPolicyClone* domainPolicy,
|
DomainPolicyClone* domainPolicy,
|
||||||
OwningSerializedStructuredCloneBuffer* initialData)
|
OwningSerializedStructuredCloneBuffer* initialData,
|
||||||
|
bool* aIsSafeMode)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIIOService> io(do_GetIOService());
|
nsCOMPtr<nsIIOService> io(do_GetIOService());
|
||||||
MOZ_ASSERT(io, "No IO service?");
|
MOZ_ASSERT(io, "No IO service?");
|
||||||
@ -3273,6 +3274,8 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
|
|||||||
buffer.steal(&initialData->data, &initialData->dataLength);
|
buffer.steal(&initialData->data, &initialData->dataLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*aIsSafeMode = mozilla::startup::IsSafeMode();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,8 @@ private:
|
|||||||
InfallibleTArray<nsString>* dictionaries,
|
InfallibleTArray<nsString>* dictionaries,
|
||||||
ClipboardCapabilities* clipboardCaps,
|
ClipboardCapabilities* clipboardCaps,
|
||||||
DomainPolicyClone* domainPolicy,
|
DomainPolicyClone* domainPolicy,
|
||||||
OwningSerializedStructuredCloneBuffer* initialData) override;
|
OwningSerializedStructuredCloneBuffer* initialData,
|
||||||
|
bool* aIsSafeMode) override;
|
||||||
|
|
||||||
virtual bool DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*) override;
|
virtual bool DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*) override;
|
||||||
|
|
||||||
|
@ -671,7 +671,8 @@ parent:
|
|||||||
returns (bool isOffline, bool isConnected, bool isLangRTL, nsString[] dictionaries,
|
returns (bool isOffline, bool isConnected, bool isLangRTL, nsString[] dictionaries,
|
||||||
ClipboardCapabilities clipboardCaps,
|
ClipboardCapabilities clipboardCaps,
|
||||||
DomainPolicyClone domainPolicy,
|
DomainPolicyClone domainPolicy,
|
||||||
OwningSerializedStructuredCloneBuffer initialData);
|
OwningSerializedStructuredCloneBuffer initialData,
|
||||||
|
bool isSafeMode);
|
||||||
|
|
||||||
sync CreateChildProcess(IPCTabContext context,
|
sync CreateChildProcess(IPCTabContext context,
|
||||||
ProcessPriority priority,
|
ProcessPriority priority,
|
||||||
|
@ -4535,6 +4535,12 @@ XRE_IsParentProcess()
|
|||||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
mozilla::startup::SetSafeMode()
|
||||||
|
{
|
||||||
|
gSafeMode = true;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef E10S_TESTING_ONLY
|
#ifdef E10S_TESTING_ONLY
|
||||||
static void
|
static void
|
||||||
LogE10sBlockedReason(const char *reason) {
|
LogE10sBlockedReason(const char *reason) {
|
||||||
|
@ -112,6 +112,9 @@ WriteStatusApplied(LPCWSTR updateDirPath);
|
|||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace startup {
|
namespace startup {
|
||||||
extern GeckoProcessType sChildProcessType;
|
extern GeckoProcessType sChildProcessType;
|
||||||
|
|
||||||
|
void SetSafeMode();
|
||||||
|
bool IsSafeMode() { return gSafeMode; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user