Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tiagovignatti/4c350eba8d57e8a926e6c36943932d50 to your computer and use it in GitHub Desktop.
Save tiagovignatti/4c350eba8d57e8a926e6c36943932d50 to your computer and use it in GitHub Desktop.
diff --git a/BUILD.gn b/BUILD.gn
index dd02030..9179661 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -882,7 +882,7 @@ if (is_android) {
java_targets = [ "//weblayer/shell/android:weblayer_support_apk" ]
}
} else {
- component("weblayer_lib") {
+ shared_library("weblayer_lib") {
public_deps = [ ":weblayer_lib_base" ]
}
}
diff --git a/shell/app/shell_main_params.cc b/shell/app/shell_main_params.cc
index 559d65a..bae1d88 100644
--- a/shell/app/shell_main_params.cc
+++ b/shell/app/shell_main_params.cc
@@ -14,6 +14,7 @@
#include "build/build_config.h"
#include "net/base/filename_util.h"
#include "url/gurl.h"
+#include "sandbox/policy/switches.h"
#include "weblayer/public/main.h"
#include "weblayer/public/profile.h"
#include "weblayer/shell/browser/shell.h"
@@ -82,6 +83,10 @@ class MainDelegateImpl : public MainDelegate {
#if !BUILDFLAG(IS_ANDROID)
void InitializeProfile() {
auto* command_line = base::CommandLine::ForCurrentProcess();
+
+ // TODO(tiago): weblayer_lib as shared_library is buggy on Sandbox.
+ command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox);
+
const bool is_incognito =
command_line->HasSwitch(switches::kStartInIncognito);
std::string profile_name = is_incognito ? "" : "web_shell";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment