mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 727c6549ed88 (bug 1256992)
This commit is contained in:
parent
f222b069b5
commit
f941ff23d8
@ -434,10 +434,6 @@ SandboxBroker::SetSecurityLevelForGMPlugin()
|
||||
bool
|
||||
SandboxBroker::AllowReadFile(wchar_t const *file)
|
||||
{
|
||||
if (!mPolicy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto result =
|
||||
mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
|
||||
sandbox::TargetPolicy::FILES_ALLOW_READONLY,
|
||||
@ -448,10 +444,6 @@ SandboxBroker::AllowReadFile(wchar_t const *file)
|
||||
bool
|
||||
SandboxBroker::AllowReadWriteFile(wchar_t const *file)
|
||||
{
|
||||
if (!mPolicy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto result =
|
||||
mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
|
||||
sandbox::TargetPolicy::FILES_ALLOW_ANY,
|
||||
@ -462,10 +454,6 @@ SandboxBroker::AllowReadWriteFile(wchar_t const *file)
|
||||
bool
|
||||
SandboxBroker::AllowDirectory(wchar_t const *dir)
|
||||
{
|
||||
if (!mPolicy) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto result =
|
||||
mPolicy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
|
||||
sandbox::TargetPolicy::FILES_ALLOW_DIR_ANY,
|
||||
@ -476,10 +464,6 @@ SandboxBroker::AllowDirectory(wchar_t const *dir)
|
||||
bool
|
||||
SandboxBroker::AddTargetPeer(HANDLE aPeerProcess)
|
||||
{
|
||||
if (!sBrokerService) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sandbox::ResultCode result = sBrokerService->AddTargetPeer(aPeerProcess);
|
||||
return (sandbox::SBOX_ALL_OK == result);
|
||||
}
|
||||
|
@ -10408,32 +10408,5 @@
|
||||
"kind": "count",
|
||||
"bug_numbers": [1237198],
|
||||
"description": "Count tiny plugin content"
|
||||
},
|
||||
"IPC_MESSAGE_SIZE": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1260908],
|
||||
"expires_in_version": "55",
|
||||
"kind": "exponential",
|
||||
"high": 8000000,
|
||||
"n_buckets": 50,
|
||||
"keyed": true,
|
||||
"description": "Measures the size of IPC messages by message name"
|
||||
},
|
||||
"MESSAGE_MANAGER_MESSAGE_SIZE": {
|
||||
"alert_emails": ["wmccloskey@mozilla.com"],
|
||||
"bug_numbers": [1260908],
|
||||
"expires_in_version": "55",
|
||||
"kind": "exponential",
|
||||
"high": 8000000,
|
||||
"n_buckets": 50,
|
||||
"keyed": true,
|
||||
"description": "Measures the size of message manager messages by message name"
|
||||
},
|
||||
"SANDBOX_BROKER_INITIALIZED": {
|
||||
"alert_emails": ["bowen@mozilla.com"],
|
||||
"bug_numbers": [1256992],
|
||||
"expires_in_version": "55",
|
||||
"kind": "boolean",
|
||||
"description": "Result of call to SandboxBroker::Initialize"
|
||||
}
|
||||
}
|
||||
|
@ -3363,24 +3363,6 @@ XREMain::XRE_mainInit(bool* aExitFlag)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_SANDBOX) && defined(XP_WIN)
|
||||
bool brokerInitialized = SandboxBroker::Initialize();
|
||||
Telemetry::Accumulate(Telemetry::SANDBOX_BROKER_INITIALIZED,
|
||||
brokerInitialized);
|
||||
if (!brokerInitialized) {
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
// If we're sandboxing content and we fail to initialize, then crashing here
|
||||
// seems like the sensible option.
|
||||
if (BrowserTabsRemoteAutostart()) {
|
||||
MOZ_CRASH("Failed to initialize broker services, can't continue.");
|
||||
}
|
||||
#endif
|
||||
// Otherwise just warn for the moment, as most things will work.
|
||||
NS_WARNING("Failed to initialize broker services, sandboxed processes will "
|
||||
"fail to start.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (EnvHasValue("MOZ_LAUNCHED_CHILD")) {
|
||||
// This is needed, on relaunch, to force the OS to use the "Cocoa Dock
|
||||
@ -3744,6 +3726,12 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
|
||||
int result;
|
||||
#ifdef XP_WIN
|
||||
UseParentConsole();
|
||||
#if defined(MOZ_SANDBOX)
|
||||
if (!SandboxBroker::Initialize()) {
|
||||
NS_WARNING("Failed to initialize broker services, sandboxed processes "
|
||||
"will fail to start.");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// RunGTest will only be set if we're in xul-unit
|
||||
if (mozilla::RunGTest) {
|
||||
@ -4329,6 +4317,20 @@ XREMain::XRE_mainRun()
|
||||
}
|
||||
#endif /* MOZ_INSTRUMENT_EVENT_LOOP */
|
||||
|
||||
#if defined(MOZ_SANDBOX) && defined(XP_WIN)
|
||||
if (!SandboxBroker::Initialize()) {
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
// If we're sandboxing content and we fail to initialize, then crashing here
|
||||
// seems like the sensible option.
|
||||
if (BrowserTabsRemoteAutostart()) {
|
||||
MOZ_CRASH("Failed to initialize broker services, can't continue.");
|
||||
}
|
||||
#endif
|
||||
// Otherwise just warn for the moment, as most things will work.
|
||||
NS_WARNING("Failed to initialize broker services, sandboxed processes will "
|
||||
"fail to start.");
|
||||
}
|
||||
#endif
|
||||
#if (defined(XP_WIN) || defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
|
||||
SetUpSandboxEnvironment();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user