mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-284121: windows sandbox initialization in JBCefApp
GitOrigin-RevId: 020e2a25658eea58f6aea4d2ba1bd604c1f73be8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a684c7c39f
commit
099b26f082
@@ -153,8 +153,23 @@ public final class JBCefApp {
|
||||
settings.cache_path = ApplicationManager.getApplication().getService(JBCefAppCache.class).getPath().toString();
|
||||
|
||||
if (Registry.is("ide.browser.jcef.sandbox.enable")) {
|
||||
LOG.debug("enabled JCEF-sandbox");
|
||||
LOG.info("JCEF-sandbox is enabled");
|
||||
settings.no_sandbox = false;
|
||||
|
||||
if (SystemInfoRt.isWindows) {
|
||||
String sandboxPtr = System.getProperty("jcef.sandbox.ptr");
|
||||
if (sandboxPtr != null && !sandboxPtr.trim().isEmpty()) {
|
||||
if (isSandboxSupported())
|
||||
settings.browser_subprocess_path = "";
|
||||
else {
|
||||
LOG.info("JCEF-sandbox was disabled because current jcef version doesn't support sandbox");
|
||||
settings.no_sandbox = true;
|
||||
}
|
||||
} else {
|
||||
LOG.info("JCEF-sandbox was disabled because java-process initialized without sandbox");
|
||||
settings.no_sandbox = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String[] argsFromProviders = JBCefAppRequiredArgumentsProvider
|
||||
@@ -224,6 +239,18 @@ public final class JBCefApp {
|
||||
};
|
||||
}
|
||||
|
||||
private static boolean isSandboxSupported() {
|
||||
JCefVersionDetails version;
|
||||
try {
|
||||
version = JCefAppConfig.getVersionDetails();
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.error("JCEF runtime version is not supported");
|
||||
return false;
|
||||
}
|
||||
return version.cefVersion.major >= 104 && version.apiVersion.minor >= 9;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
Disposable getDisposable() {
|
||||
return myDisposable;
|
||||
|
||||
Reference in New Issue
Block a user