Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions gui/webdisplay/src/RWebDisplayHandle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,16 @@ RWebDisplayHandle::ChromeCreator::ChromeCreator(bool _edge) : BrowserCreator(tru
bool use_normal = (fChromeVersion < 119) || (fChromeVersion > 131);
#endif
if (use_normal) {
TString extra_arg;
// in starting from version 151 one have to allow use of unsafe swiftshader
if (fChromeVersion > 150)
extra_arg = "--enable-unsafe-swiftshader";
// in docker disable shared memory usage because of limited resources
if (!gSystem->AccessPathName("/.dockerenv", kFileExists))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit scared of changing the behaviour of ROOT at runtime based on the fact that a container is running. Are there any alternatives we can explore?

extra_arg.Append(" --disable-dev-shm-usage");
// old or newest browser with standard headless mode
fBatchExec = gEnv->GetValue((fEnvPrefix + "Batch").c_str(), "fork:--headless --no-sandbox --disable-extensions --disable-audio-output $geometry --dump-dom $url");
fHeadlessExec = gEnv->GetValue((fEnvPrefix + "Headless").c_str(), "fork:--headless --no-sandbox --disable-extensions --disable-audio-output $geometry $url");
fBatchExec = gEnv->GetValue((fEnvPrefix + "Batch").c_str(), TString::Format("fork:--headless --no-sandbox --disable-extensions --disable-audio-output %s $geometry --dump-dom $url", extra_arg.Data()).Data());
fHeadlessExec = gEnv->GetValue((fEnvPrefix + "Headless").c_str(), TString::Format("fork:--headless --no-sandbox --disable-extensions --disable-audio-output %s $geometry $url", extra_arg.Data()).Data());
} else {
// newer version with headless=new mode
fBatchExec = gEnv->GetValue((fEnvPrefix + "Batch").c_str(), "fork:--headless=new --no-sandbox --disable-extensions --disable-audio-output $geometry --dump-dom $url");
Expand Down
Loading