This commit is contained in:
deepak1556 2023-12-05 15:32:27 +09:00
Родитель 194109ed5a
Коммит 351473ab43
5 изменённых файлов: 33 добавлений и 6 удалений

Просмотреть файл

@ -304,7 +304,7 @@ for:
if ($env:TARGET_ARCH -eq 'ia32') { if ($env:TARGET_ARCH -eq 'ia32') {
$env:npm_config_arch = "ia32" $env:npm_config_arch = "ia32"
} }
- echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging - echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main -g 'utilityProcess module lifecycle events' --enable-logging
- cd .. - cd ..
- echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg - echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
- echo "About to verify mksnapshot" - echo "About to verify mksnapshot"

Просмотреть файл

@ -5,6 +5,27 @@ Subject: ci: logging
DO NOT COMMIT! DO NOT COMMIT!
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index e351c233b58fbcffcedd291e4b28bf8d1fd40427..6c54b78ceef6bbf147f69d53346130d12cc4a20d 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -467,6 +467,7 @@ void BrowserChildProcessHostImpl::OnChannelInitialized(IPC::Channel* channel) {
}
void BrowserChildProcessHostImpl::OnChildDisconnected() {
+ LOG(WARNING) << "BrowserChildProcessHostImpl::OnChildDisconnected";
DCHECK_CURRENTLY_ON(BrowserThread::UI);
tracing_registration_.reset();
@@ -480,6 +481,8 @@ void BrowserChildProcessHostImpl::OnChildDisconnected() {
if (child_process_launcher_.get() || IsProcessLaunched()) {
ChildProcessTerminationInfo info =
GetTerminationInfo(true /* known_dead */);
+ LOG(WARNING) << "BrowserChildProcessHostImpl::OnChildDisconnected: "
+ << info.status << ", " << info.exit_code;
#if BUILDFLAG(IS_ANDROID)
exited_abnormally_ = true;
// Do not treat clean_exit, ie when child process exited due to quitting
diff --git a/content/browser/child_process_host_impl.cc b/content/browser/child_process_host_impl.cc diff --git a/content/browser/child_process_host_impl.cc b/content/browser/child_process_host_impl.cc
index b9dad494f9a55c70dab570907259544b3f8ea7f5..b1bf2b6e5503b467c76a94a7ab4d170b348ff6e1 100644 index b9dad494f9a55c70dab570907259544b3f8ea7f5..b1bf2b6e5503b467c76a94a7ab4d170b348ff6e1 100644
--- a/content/browser/child_process_host_impl.cc --- a/content/browser/child_process_host_impl.cc

Просмотреть файл

@ -870,6 +870,10 @@ void App::BrowserChildProcessKilled(
void App::BrowserChildProcessCrashedOrKilled( void App::BrowserChildProcessCrashedOrKilled(
const content::ChildProcessData& data, const content::ChildProcessData& data,
const content::ChildProcessTerminationInfo& info) { const content::ChildProcessTerminationInfo& info) {
LOG(WARNING) << "ChildProcessCrashedOrKilled: type=" << data.process_type
<< ", metrics_name=" << data.metrics_name
<< ", status=" << info.status
<< ", exit_code=" << info.exit_code;
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
auto details = gin_helper::Dictionary::CreateEmpty(isolate); auto details = gin_helper::Dictionary::CreateEmpty(isolate);

Просмотреть файл

@ -215,6 +215,8 @@ void UtilityProcessWrapper::OnServiceProcessLaunched(
void UtilityProcessWrapper::OnServiceProcessDisconnected( void UtilityProcessWrapper::OnServiceProcessDisconnected(
uint32_t error_code, uint32_t error_code,
const std::string& description) { const std::string& description) {
LOG(WARNING) << "Utility process disconnected with error code " << error_code
<< ": " << description;
if (pid_ != base::kNullProcessId) if (pid_ != base::kNullProcessId)
GetAllUtilityProcessWrappers().Remove(pid_); GetAllUtilityProcessWrappers().Remove(pid_);
CloseConnectorPort(); CloseConnectorPort();

Просмотреть файл

@ -47,12 +47,12 @@ describe('utilityProcess module', () => {
}); });
describe('lifecycle events', () => { describe('lifecycle events', () => {
it('emits \'spawn\' when child process successfully launches', async () => { it.skip('emits \'spawn\' when child process successfully launches', async () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'empty.js')); const child = utilityProcess.fork(path.join(fixturesPath, 'empty.js'));
await once(child, 'spawn'); await once(child, 'spawn');
}); });
it('emits \'exit\' when child process exits gracefully', async () => { it.skip('emits \'exit\' when child process exits gracefully', async () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'empty.js')); const child = utilityProcess.fork(path.join(fixturesPath, 'empty.js'));
const [code] = await once(child, 'exit'); const [code] = await once(child, 'exit');
expect(code).to.equal(0); expect(code).to.equal(0);
@ -74,19 +74,19 @@ describe('utilityProcess module', () => {
await once(child1, 'exit'); await once(child1, 'exit');
}); });
it('emits \'exit\' when there is uncaught exception', async () => { it.skip('emits \'exit\' when there is uncaught exception', async () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'exception.js')); const child = utilityProcess.fork(path.join(fixturesPath, 'exception.js'));
const [code] = await once(child, 'exit'); const [code] = await once(child, 'exit');
expect(code).to.equal(1); expect(code).to.equal(1);
}); });
it('emits \'exit\' when there is uncaught exception in ESM', async () => { it.skip('emits \'exit\' when there is uncaught exception in ESM', async () => {
const child = utilityProcess.fork(path.join(fixturesPath, 'exception.mjs')); const child = utilityProcess.fork(path.join(fixturesPath, 'exception.mjs'));
const [code] = await once(child, 'exit'); const [code] = await once(child, 'exit');
expect(code).to.equal(1); expect(code).to.equal(1);
}); });
it('emits \'exit\' when process.exit is called', async () => { it.skip('emits \'exit\' when process.exit is called', async () => {
const exitCode = 2; const exitCode = 2;
const child = utilityProcess.fork(path.join(fixturesPath, 'custom-exit.js'), [`--exitCode=${exitCode}`]); const child = utilityProcess.fork(path.join(fixturesPath, 'custom-exit.js'), [`--exitCode=${exitCode}`]);
const [code] = await once(child, 'exit'); const [code] = await once(child, 'exit');