macOS: Load the CEF framework using dlopen instead of direct linking (issue #2459)

This is a prerequisite for using the Chromium V2 sandbox.
This commit is contained in:
Marshall Greenblatt
2018-07-27 11:39:53 -04:00
parent 0fb03e7aa1
commit fcad76b405
21 changed files with 2722 additions and 88 deletions

View File

@@ -3,6 +3,7 @@
// be found in the LICENSE file.
#include "include/cef_app.h"
#import "include/wrapper/cef_library_loader.h"
#include "tests/shared/common/client_app_other.h"
#include "tests/shared/renderer/client_app_renderer.h"
@@ -10,6 +11,12 @@
namespace client {
int RunMain(int argc, char* argv[]) {
// Load the CEF framework library at runtime instead of linking directly
// as required by the macOS sandbox implementation.
CefScopedLibraryLoader library_loader;
if (!library_loader.LoadInHelper())
return 1;
CefMainArgs main_args(argc, argv);
// Parse command-line arguments.
@@ -30,7 +37,7 @@ int RunMain(int argc, char* argv[]) {
} // namespace client
// Process entry point.
// Entry point function for sub-processes.
int main(int argc, char* argv[]) {
return client::RunMain(argc, argv);
}