• Krzysztof Olczyk's avatar
    Fix a DCHECK when starting single-process with mojo core lib. · 9da5790e
    Krzysztof Olczyk authored
    When Chromium is started with dynamic more core lib
    (--mojo-core-library-path=path_to_lib), the given library
    is used for core mojo functionality instead of the mojo core
    embedded in the Chromium.
    
    This switch is propagated to child processes (such as gpu process)
    in order for them to use the same mojo core library.
    Due to sandboxes, the library is loaded early for child processes
    and initialized in a separate step.
    
    However, if single process mode is used (--single-process)
    the ChildProcess class is instantiated in a thread of browser process.
    
    This results in a library being loaded twice and an adequate DCHECK.
    
    Don't attempt to load the mojo core library if ChildProcess instance
    is run embedded in the browser process.
    
    Change-Id: Ic22d612481b62ccc6b1d07fa245b56bde55e42d5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517460Reviewed-by: default avatarKen Rockot <rockot@google.com>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Commit-Queue: Krzysztof Olczyk <kolczyk@vewd.com>
    Cr-Commit-Position: refs/heads/master@{#823602}
    9da5790e
child_process.cc 6.41 KB