Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Issue 585203002: Turn FileDescriptorInfo a collection class (Closed)

Created:
6 years, 3 months ago by Hajime Morrita
Modified:
6 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org, mkwst+moarreviews-shell_chromium.org, jam, jochen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Turn FileDescriptorInfo a collection class This is a part of "kiling FileDescriptor" effort. This CL turns vector<FileDescriptorInfo> into FileDescriptorInfo, and makes the class a container of file descriptor and associated ID. The goal is to make ownership of file descriptor easy to reason. Now the lifetime is tracked by ScopedFD and it's clear who is responsible for that. R=jam@chromium.org, jln@chromium.org BUG=415294 Committed: https://crrev.com/d95714f1db8dd1fe6138579db3971da4e947a5bf Cr-Commit-Position: refs/heads/master@{#297584}

Patch Set 1 #

Total comments: 15

Patch Set 2 : Updated #

Patch Set 3 : Fixing windows build failure #

Total comments: 1

Patch Set 4 : #

Patch Set 5 : Fixing android build error #

Total comments: 20

Patch Set 6 : Landing #

Patch Set 7 : Landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -95 lines) Patch
M chrome/browser/chrome_content_browser_client.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 4 chunks +13 lines, -14 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/android/child_process_launcher_android.h View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M content/browser/android/child_process_launcher_android.cc View 1 2 3 4 5 3 chunks +10 lines, -6 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 chunks +24 lines, -25 lines 0 comments Download
A content/browser/file_descriptor_info_impl.h View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A content/browser/file_descriptor_info_impl.cc View 1 2 3 4 5 1 chunk +69 lines, -0 lines 0 comments Download
A content/browser/file_descriptor_info_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +86 lines, -0 lines 0 comments Download
M content/browser/zygote_host/zygote_host_impl_linux.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/zygote_host/zygote_host_impl_linux.cc View 1 2 3 4 5 3 chunks +11 lines, -17 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/file_descriptor_info.h View 1 2 3 4 5 1 chunk +33 lines, -14 lines 0 comments Download
M content/shell/browser/shell_content_browser_client.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/shell/browser/shell_content_browser_client.cc View 1 3 chunks +6 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
Hajime Morrita
6 years, 3 months ago (2014-09-20 01:46:12 UTC) #1
jln (very slow on Chromium)
(I only looked at the Zygote part). This looks ok, but having multiple file descriptor ...
6 years, 3 months ago (2014-09-22 17:54:15 UTC) #3
mdempsky
https://codereview.chromium.org/585203002/diff/1/content/browser/child_process_launcher.cc File content/browser/child_process_launcher.cc (right): https://codereview.chromium.org/585203002/diff/1/content/browser/child_process_launcher.cc#newcode255 content/browser/child_process_launcher.cc:255: fds_to_map[i].second += base::GlobalDescriptors::kBaseDescriptor; I know FileHandleMappingVector predates your CL, ...
6 years, 3 months ago (2014-09-22 18:30:51 UTC) #4
Hajime Morrita
Thanks for the thorough review! I updated the CL. PTAL? https://chromiumcodereview.appspot.com/585203002/diff/1/content/browser/child_process_launcher.cc File content/browser/child_process_launcher.cc (right): https://chromiumcodereview.appspot.com/585203002/diff/1/content/browser/child_process_launcher.cc#newcode255 ...
6 years, 3 months ago (2014-09-22 22:59:26 UTC) #5
jam
https://codereview.chromium.org/585203002/diff/40001/content/public/browser/file_descriptor_info.h File content/public/browser/file_descriptor_info.h (right): https://codereview.chromium.org/585203002/diff/40001/content/public/browser/file_descriptor_info.h#newcode15 content/public/browser/file_descriptor_info.h:15: // FileDescriptorInfo is a collection of file descriptors which ...
6 years, 3 months ago (2014-09-23 05:16:09 UTC) #6
Hajime Morrita
Thanks for the review John! On 2014/09/23 05:16:09, jam wrote: > https://codereview.chromium.org/585203002/diff/40001/content/public/browser/file_descriptor_info.h > File content/public/browser/file_descriptor_info.h ...
6 years, 3 months ago (2014-09-23 21:20:42 UTC) #7
jam
lgtm https://codereview.chromium.org/585203002/diff/80001/content/public/browser/file_descriptor_info.h File content/public/browser/file_descriptor_info.h (right): https://codereview.chromium.org/585203002/diff/80001/content/public/browser/file_descriptor_info.h#newcode14 content/public/browser/file_descriptor_info.h:14: // needed to launch a process. You should ...
6 years, 3 months ago (2014-09-24 20:45:47 UTC) #8
mdempsky
overall lgtm too, with a handful of remaining nits https://codereview.chromium.org/585203002/diff/80001/content/browser/android/child_process_launcher_android.cc File content/browser/android/child_process_launcher_android.cc (right): https://codereview.chromium.org/585203002/diff/80001/content/browser/android/child_process_launcher_android.cc#newcode137 content/browser/android/child_process_launcher_android.cc:137: ...
6 years, 3 months ago (2014-09-24 21:16:45 UTC) #9
Hajime Morrita
Thanks for the review! Landing. https://codereview.chromium.org/585203002/diff/80001/content/browser/android/child_process_launcher_android.cc File content/browser/android/child_process_launcher_android.cc (right): https://codereview.chromium.org/585203002/diff/80001/content/browser/android/child_process_launcher_android.cc#newcode137 content/browser/android/child_process_launcher_android.cc:137: file_fds[i] = dup(files_to_register->GetFDAt(i)); On ...
6 years, 3 months ago (2014-09-24 23:08:57 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/585203002/100001
6 years, 2 months ago (2014-09-25 16:11:25 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/12441)
6 years, 2 months ago (2014-09-25 16:28:50 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/585203002/120001
6 years, 2 months ago (2014-10-01 01:14:38 UTC) #16
commit-bot: I haz the power
Committed patchset #7 (id:120001) as 401a2d3c2f391042d98d3f1d43e9f3ab0cf9e162
6 years, 2 months ago (2014-10-01 02:37:39 UTC) #17
commit-bot: I haz the power
6 years, 2 months ago (2014-10-01 02:38:23 UTC) #18
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/d95714f1db8dd1fe6138579db3971da4e947a5bf
Cr-Commit-Position: refs/heads/master@{#297584}

Powered by Google App Engine
This is Rietveld 408576698