func ExecuteProcess(programHandle unsafe.Pointer, appHandler AppHandler) int { Logger.Infof("ExecuteProcess, args=%v", os.Args) _InitializeGlobalCStructures() if appHandler.GetAppHandlerT().CStruct == nil { panic("GetAppHandlerT cannot have a nil CStruct. Call NewAppHandlerT() to create one!") } FillMainArgs(_MainArgs, programHandle) // Sandbox info needs to be passed to both cef_execute_process() // and cef_initialize(). // OFF: _SandboxInfo = C.cef_sandbox_info_create() Logger.Infof("MainArgs %X _AppHanlder %X _SandboxInfo %X", _MainArgs, appHandler.GetAppHandlerT().CStruct, _SandboxInfo) go_AddRef(unsafe.Pointer(_MainArgs)) go_AddRef(unsafe.Pointer(appHandler.GetAppHandlerT().CStruct)) go_AddRef(unsafe.Pointer(_SandboxInfo)) var exitCode C.int = C.cef_execute_process(_MainArgs, appHandler.GetAppHandlerT().CStruct, _SandboxInfo) if exitCode >= 0 { os.Exit(int(exitCode)) } return int(exitCode) }
func ExecuteProcess(appHandle unsafe.Pointer) int { log.Debug("ExecuteProcess, args=%v", os.Args) _InitializeGlobalCStructures() FillMainArgs(_MainArgs, appHandle) // Sandbox info needs to be passed to both cef_execute_process() // and cef_initialize(). // OFF: _SandboxInfo = C.cef_sandbox_info_create() var exitCode C.int = C.cef_execute_process(_MainArgs, _AppHandler, nil) if exitCode >= 0 { os.Exit(int(exitCode)) } log.Debug("Finished ExecuteProcess, args=%v %d %d", os.Args, os.Getpid(), exitCode) return int(exitCode) }
func ExecuteProcess(appHandle unsafe.Pointer) int { Logger.Println("ExecuteProcess, args=", os.Args) _InitializeGlobalCStructures() FillMainArgs(_MainArgs, appHandle) // Sandbox info needs to be passed to both cef_execute_process() // and cef_initialize(). // OFF: _SandboxInfo = C.cef_sandbox_info_create() var exitCode C.int = C.cef_execute_process(_MainArgs, _AppHandler, _SandboxInfo) if exitCode >= 0 { os.Exit(int(exitCode)) } return int(exitCode) }