Linux/cefsimple: command line arguments are discarded

Issue #2208 resolved
Christian Thießen created an issue

1.What steps will reproduce the problem? Build CEF. In, set settings.command_line_args_disabled = 0; settings.remote_debugging_port = 9222;

Add an implementation of SimpleApp::OnBeforeCommandLineProcessing to cefsimple that prints command_line->GetCommandLineString().

Run cefsimple with some command-line arguments, e.g. --url=file:///some/file.html

2.What is the expected output? What do you see instead? Expected: The command-line arguments (url) and the ones implied through CefSettings (remote-debugging-port) are combined, all are printed, the browser behaves accordingly.

Observed: Any command-line argument is discarded, only "lang" and "remote-debugging-port" are printed. It seems somewhere behind the scenes of CefInitialize, the code starts with a fresh empty CommandLine object instead of initializing it with argv. This should only happen if command_line_args_disabled is true, but it happens always.

3.What version of the product are you using? On what operating system? 3.3071.109 on RHEL 7, Linux 4.8.11-1.el7.elrepo.x86_64

4.Does the problem reproduce with the cefclient or cefsimple sample application at the same version? How about with a newer or older version? The problem was not present with 3.2785.1486, which is the last one I've built before.

5.Does the problem reproduce with Google Chrome at the same version? How about with a newer or older version? Honestly, I didn't try.

Comments (5)

  1. Oleksandr Tymoshenko

    [I have the same problem. I narrowed it down to cef/libcef/browser/, lines 77-80:

          new content::ContentServiceManagerMainDelegate(params));
          new service_manager::MainParams(sm_main_delegate_.get()));

    This sequence is supposed to pass argc/argv to sm_main_params_ but it doesn't happen. I used quick hack (patch attached) to work around this issue.

  2. Log in to comment