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 "mozInlineSpellChecker.h"
|
||||
#include "nsAppRunner.h"
|
||||
#include "nsIConsoleListener.h"
|
||||
#include "nsICycleCollectorListener.h"
|
||||
#include "nsIDragService.h"
|
||||
@ -800,17 +801,23 @@ ContentChild::InitXPCOM()
|
||||
|
||||
bool isOffline, isLangRTL;
|
||||
bool isConnected;
|
||||
bool isSafeMode;
|
||||
ClipboardCapabilities clipboardCaps;
|
||||
DomainPolicyClone domainPolicy;
|
||||
OwningSerializedStructuredCloneBuffer initialData;
|
||||
|
||||
SendGetXPCOMProcessAttributes(&isOffline, &isConnected,
|
||||
&isLangRTL, &mAvailableDictionaries,
|
||||
&clipboardCaps, &domainPolicy, &initialData);
|
||||
&clipboardCaps, &domainPolicy, &initialData,
|
||||
&isSafeMode);
|
||||
RecvSetOffline(isOffline);
|
||||
RecvSetConnectivity(isConnected);
|
||||
RecvBidiKeyboardNotify(isLangRTL);
|
||||
|
||||
if (isSafeMode) {
|
||||
mozilla::startup::SetSafeMode();
|
||||
}
|
||||
|
||||
// Create the CPOW manager as soon as possible.
|
||||
SendPJavaScriptConstructor();
|
||||
|
||||
|
@ -3218,7 +3218,8 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
|
||||
InfallibleTArray<nsString>* dictionaries,
|
||||
ClipboardCapabilities* clipboardCaps,
|
||||
DomainPolicyClone* domainPolicy,
|
||||
OwningSerializedStructuredCloneBuffer* initialData)
|
||||
OwningSerializedStructuredCloneBuffer* initialData,
|
||||
bool* aIsSafeMode)
|
||||
{
|
||||
nsCOMPtr<nsIIOService> io(do_GetIOService());
|
||||
MOZ_ASSERT(io, "No IO service?");
|
||||
@ -3273,6 +3274,8 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline,
|
||||
buffer.steal(&initialData->data, &initialData->dataLength);
|
||||
}
|
||||
|
||||
*aIsSafeMode = mozilla::startup::IsSafeMode();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -554,7 +554,8 @@ private:
|
||||
InfallibleTArray<nsString>* dictionaries,
|
||||
ClipboardCapabilities* clipboardCaps,
|
||||
DomainPolicyClone* domainPolicy,
|
||||
OwningSerializedStructuredCloneBuffer* initialData) override;
|
||||
OwningSerializedStructuredCloneBuffer* initialData,
|
||||
bool* aIsSafeMode) override;
|
||||
|
||||
virtual bool DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*) override;
|
||||
|
||||
|
@ -671,7 +671,8 @@ parent:
|
||||
returns (bool isOffline, bool isConnected, bool isLangRTL, nsString[] dictionaries,
|
||||
ClipboardCapabilities clipboardCaps,
|
||||
DomainPolicyClone domainPolicy,
|
||||
OwningSerializedStructuredCloneBuffer initialData);
|
||||
OwningSerializedStructuredCloneBuffer initialData,
|
||||
bool isSafeMode);
|
||||
|
||||
sync CreateChildProcess(IPCTabContext context,
|
||||
ProcessPriority priority,
|
||||
|
@ -4535,6 +4535,12 @@ XRE_IsParentProcess()
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
}
|
||||
|
||||
void
|
||||
mozilla::startup::SetSafeMode()
|
||||
{
|
||||
gSafeMode = true;
|
||||
}
|
||||
|
||||
#ifdef E10S_TESTING_ONLY
|
||||
static void
|
||||
LogE10sBlockedReason(const char *reason) {
|
||||
|
@ -112,6 +112,9 @@ WriteStatusApplied(LPCWSTR updateDirPath);
|
||||
namespace mozilla {
|
||||
namespace startup {
|
||||
extern GeckoProcessType sChildProcessType;
|
||||
|
||||
void SetSafeMode();
|
||||
bool IsSafeMode() { return gSafeMode; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user