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

Issue 2122303002: Revive experiment to isolate shell operations. (Closed)

Created:
4 years, 5 months ago by Patrick Monette
Modified:
3 years, 6 months ago
Reviewers:
sky, dcheng, Will Harris
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Isolate shell operations to the utility process. Shell operations can cause 3rd-party shell extensions to be loaded into the caller's process. The utility process protects the browser process from potential instability. Also convert the IPC mechanism to Mojo. BUG=73098 Committed: https://crrev.com/b7faec8d94ef286d2b92144c2836b170c2cdea95 Cr-Commit-Position: refs/heads/master@{#405270}

Patch Set 1 #

Total comments: 19

Patch Set 2 : Nits #

Total comments: 2

Patch Set 3 : HandleToUint32 #

Patch Set 4 : Rebase #

Patch Set 5 : Helper function #

Patch Set 6 : Trying stuff #

Patch Set 7 : Try 2 #

Patch Set 8 : Try 3 #

Patch Set 9 : try 4 #

Patch Set 10 : Rebase #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -453 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/win/chrome_select_file_dialog_factory.h View 1 2 chunks +1 line, -11 lines 0 comments Download
M chrome/browser/win/chrome_select_file_dialog_factory.cc View 1 2 1 chunk +126 lines, -244 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_utility.gypi View 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_utility_messages.h View 5 chunks +0 lines, -55 lines 0 comments Download
M chrome/common/shell_handler_win.mojom View 1 2 1 chunk +46 lines, -1 line 0 comments Download
A chrome/common/shell_handler_win.typemap View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/common/typemaps.gni View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/utility/chrome_content_utility_client.cc View 2 chunks +0 lines, -5 lines 0 comments Download
D chrome/utility/ipc_shell_handler_win.h View 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/utility/ipc_shell_handler_win.cc View 1 2 3 1 chunk +0 lines, -79 lines 0 comments Download
M chrome/utility/shell_handler_impl_win.h View 1 2 2 chunks +21 lines, -0 lines 0 comments Download
M chrome/utility/shell_handler_impl_win.cc View 1 2 3 4 2 chunks +58 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/chromium_bindings_configuration.gni View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 52 (20 generated)
Patrick Monette
sky@ PTAL. I'm reviving an old experiment because I think it's worth avoiding the crashes ...
4 years, 5 months ago (2016-07-07 22:47:27 UTC) #7
sky
Just a handful of nits. You'll need a security review for the mojom changes. https://codereview.chromium.org/2122303002/diff/20001/chrome/browser/win/chrome_select_file_dialog_factory.cc ...
4 years, 5 months ago (2016-07-08 15:28:21 UTC) #8
Patrick Monette
Thanks! I've fixed the nits. dcheng@ PTAL at chrome_utility_messages.h and shell_handler_win.mojom for security POV. https://codereview.chromium.org/2122303002/diff/20001/chrome/browser/win/chrome_select_file_dialog_factory.cc ...
4 years, 5 months ago (2016-07-08 19:36:11 UTC) #9
Patrick Monette
Forgot to add dcheng@...
4 years, 5 months ago (2016-07-08 19:36:32 UTC) #11
sky
LGTM https://codereview.chromium.org/2122303002/diff/20001/chrome/common/shell_handler_win.mojom File chrome/common/shell_handler_win.mojom (right): https://codereview.chromium.org/2122303002/diff/20001/chrome/common/shell_handler_win.mojom#newcode17 chrome/common/shell_handler_win.mojom:17: // parent of the modal dialog, |flags| are ...
4 years, 5 months ago (2016-07-08 20:47:15 UTC) #12
Patrick Monette
On 2016/07/08 20:47:15, sky wrote: > LGTM > > https://codereview.chromium.org/2122303002/diff/20001/chrome/common/shell_handler_win.mojom > File chrome/common/shell_handler_win.mojom (right): > ...
4 years, 5 months ago (2016-07-08 20:51:57 UTC) #13
dcheng
The changes seem reasonable to me, but I have a Windows question for +wfh: The ...
4 years, 5 months ago (2016-07-11 09:00:46 UTC) #15
Patrick Monette
https://codereview.chromium.org/2122303002/diff/40001/chrome/browser/win/chrome_select_file_dialog_factory.cc File chrome/browser/win/chrome_select_file_dialog_factory.cc (right): https://codereview.chromium.org/2122303002/diff/40001/chrome/browser/win/chrome_select_file_dialog_factory.cc#newcode27 chrome/browser/win/chrome_select_file_dialog_factory.cc:27: "IsolateShellOperations", base::FEATURE_DISABLED_BY_DEFAULT}; On 2016/07/11 09:00:46, dcheng wrote: > Per ...
4 years, 5 months ago (2016-07-11 22:11:37 UTC) #16
Will Harris
On 2016/07/11 09:00:46, dcheng wrote: > The changes seem reasonable to me, but I have ...
4 years, 5 months ago (2016-07-11 23:39:14 UTC) #17
Patrick Monette
Done. I doesn't seem like there is an equivalent Uint32ToHandle() to cast back tho.
4 years, 5 months ago (2016-07-12 19:38:21 UTC) #18
Will Harris
This all lgtm from a win perspective. On 2016/07/12 19:38:21, Patrick Monette wrote: > Done. ...
4 years, 5 months ago (2016-07-12 19:50:06 UTC) #19
dcheng
On 2016/07/12 19:50:06, Will Harris wrote: > This all lgtm from a win perspective. > ...
4 years, 5 months ago (2016-07-13 02:08:36 UTC) #20
Will Harris
On 2016/07/13 02:08:36, dcheng wrote: > On 2016/07/12 19:50:06, Will Harris wrote: > > This ...
4 years, 5 months ago (2016-07-13 16:00:28 UTC) #21
dcheng
On 2016/07/13 16:00:28, Will Harris wrote: > On 2016/07/13 02:08:36, dcheng wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:19:48 UTC) #22
Will Harris
On 2016/07/13 16:19:48, dcheng wrote: > On 2016/07/13 16:00:28, Will Harris wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:26:25 UTC) #23
Patrick Monette
On 2016/07/13 16:19:48, dcheng wrote: > On 2016/07/13 16:00:28, Will Harris wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:28:04 UTC) #24
dcheng
On 2016/07/13 16:28:04, Patrick Monette wrote: > On 2016/07/13 16:19:48, dcheng wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:32:33 UTC) #25
Patrick Monette
On 2016/07/13 16:32:33, dcheng wrote: > On 2016/07/13 16:28:04, Patrick Monette wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:43:58 UTC) #26
Will Harris
On 2016/07/13 16:43:58, Patrick Monette wrote: > On 2016/07/13 16:32:33, dcheng wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:46:28 UTC) #27
dcheng
On 2016/07/13 16:43:58, Patrick Monette wrote: > On 2016/07/13 16:32:33, dcheng wrote: > > On ...
4 years, 5 months ago (2016-07-13 16:46:57 UTC) #28
Patrick Monette
Thanks! Committing.
4 years, 5 months ago (2016-07-13 17:27:17 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2122303002/100001
4 years, 5 months ago (2016-07-13 17:27:58 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/103281)
4 years, 5 months ago (2016-07-13 18:52:09 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2122303002/100001
4 years, 5 months ago (2016-07-13 19:17:28 UTC) #36
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 5 months ago (2016-07-13 20:21:51 UTC) #38
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-13 20:22:07 UTC) #39
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/b7faec8d94ef286d2b92144c2836b170c2cdea95 Cr-Commit-Position: refs/heads/master@{#405270}
4 years, 5 months ago (2016-07-13 20:24:18 UTC) #41
nektarios
A revert of this CL (patchset #5 id:100001) has been created in https://codereview.chromium.org/2151643002/ by nektar@chromium.org. ...
4 years, 5 months ago (2016-07-13 21:10:16 UTC) #42
nektarios
A revert of this CL (patchset #5 id:100001) has been created in https://codereview.chromium.org/2141093005/ by nektar@chromium.org. ...
4 years, 5 months ago (2016-07-13 21:10:21 UTC) #43
Dan Beam
A revert of this CL (patchset #5 id:100001) has been created in https://codereview.chromium.org/2147763003/ by dbeam@chromium.org. ...
4 years, 5 months ago (2016-07-13 21:10:28 UTC) #44
Will Harris
wow three reverts, must have been very broken! :)
4 years, 5 months ago (2016-07-13 21:19:52 UTC) #45
nektarios
4 years, 5 months ago (2016-07-13 21:44:57 UTC) #47
Copy / pasting one of the compile logs here FYI:
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.h(27):
error C3668: 'ShellHandlerImpl::DoGetOpenFileName': method with override
specifier 'override' did not override any base class methods
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.h(35):
error C3668: 'ShellHandlerImpl::DoGetSaveFileName': method with override
specifier 'override' did not override any base class methods
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(216):
error C2259: 'ShellHandlerImpl': cannot instantiate abstract class
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(216):
note: due to following members:
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(216):
note: 'void
mojom::ShellHandler::DoGetOpenFileName(uint32_t,uint32_t,mojom::FileExtensionFiltersPtr,mojo::common::mojom::FilePathPtr,mojo::common::mojom::FilePathPtr,const
mojom::ShellHandler::DoGetOpenFileNameCallback &)': is abstract
c:\b\build\slave\win_x64\build\src\out\release_x64\gen\chrome\common\shell_handler_win.mojom.h(83):
note: see declaration of 'mojom::ShellHandler::DoGetOpenFileName'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(216):
note: 'void
mojom::ShellHandler::DoGetSaveFileName(uint32_t,uint32_t,mojom::FileExtensionFiltersPtr,uint32_t,mojo::common::mojom::FilePathPtr,mojo::common::mojom::FilePathPtr,mojo::common::mojom::FilePathPtr,const
mojom::ShellHandler::DoGetSaveFileNameCallback &)': is abstract
c:\b\build\slave\win_x64\build\src\out\release_x64\gen\chrome\common\shell_handler_win.mojom.h(87):
note: see declaration of 'mojom::ShellHandler::DoGetSaveFileName'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(249):
error C2664: 'void base::Callback<void
(mojo::common::mojom::FilePathPtr,mojo::Array<mojo::common::mojom::FilePathPtr>),base::internal::CopyMode::Copyable>::Run(mojo::common::mojom::FilePathPtr,mojo::Array<mojo::common::mojom::FilePathPtr>)
const': cannot convert argument 1 from 'base::FilePath' to
'mojo::common::mojom::FilePathPtr'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(249):
note: No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(251):
error C2664: 'void base::Callback<void
(mojo::common::mojom::FilePathPtr,mojo::Array<mojo::common::mojom::FilePathPtr>),base::internal::CopyMode::Copyable>::Run(mojo::common::mojom::FilePathPtr,mojo::Array<mojo::common::mojom::FilePathPtr>)
const': cannot convert argument 1 from 'base::FilePath' to
'mojo::common::mojom::FilePathPtr'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(251):
note: No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(272):
error C2664: 'void base::Callback<void
(mojo::common::mojom::FilePathPtr,uint32_t),base::internal::CopyMode::Copyable>::Run(mojo::common::mojom::FilePathPtr,uint32_t)
const': cannot convert argument 1 from 'base::FilePath' to
'mojo::common::mojom::FilePathPtr'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(272):
note: No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(281):
error C2664: 'void base::Callback<void
(mojo::common::mojom::FilePathPtr,uint32_t),base::internal::CopyMode::Copyable>::Run(mojo::common::mojom::FilePathPtr,uint32_t)
const': cannot convert argument 1 from 'base::FilePath' to
'mojo::common::mojom::FilePathPtr'
c:\b\build\slave\win_x64\build\src\chrome\utility\shell_handler_impl_win.cc(281):
note: No user-defined-conversion operator available that can perform
this conversion, or the operator cannot be called

Powered by Google App Engine
This is Rietveld 408576698