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

Issue 9959018: Use ScopedProcessInformation and other RAII types in sandbox. (Closed)

Created:
8 years, 8 months ago by erikwright (departed)
Modified:
8 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Use ScopedProcessInformation and other RAII types in sandbox. See http://codereview.chromium.org/9700038/ for the definition of ScopedProcessInformation. BUG=None TEST=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=130716

Patch Set 1 #

Total comments: 14

Patch Set 2 : Another potentially leaked HANDLE. #

Total comments: 5

Patch Set 3 : Remove ScopedProcessInformation from the public interface of sandbox/. #

Patch Set 4 : Remove content/ changes as they may be committed separately and require separate OWNERS approval. #

Patch Set 5 : Revert the public API documentation change too. #

Total comments: 1

Patch Set 6 : Update copyright years. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -168 lines) Patch
M sandbox/src/Wow64.cc View 1 2 3 4 5 3 chunks +7 lines, -8 lines 0 comments Download
M sandbox/src/broker_services.cc View 1 2 5 chunks +19 lines, -26 lines 0 comments Download
M sandbox/src/interception_unittest.cc View 1 2 3 4 5 3 chunks +15 lines, -3 lines 0 comments Download
M sandbox/src/job_unittest.cc View 1 2 3 4 5 3 chunks +7 lines, -6 lines 0 comments Download
M sandbox/src/policy_target_test.cc View 1 2 3 4 5 5 chunks +20 lines, -23 lines 0 comments Download
M sandbox/src/process_policy_test.cc View 1 2 3 4 5 7 chunks +12 lines, -11 lines 0 comments Download
M sandbox/src/restricted_token_utils.cc View 1 2 3 4 5 4 chunks +14 lines, -13 lines 0 comments Download
M sandbox/src/target_process.h View 1 2 3 4 5 5 chunks +19 lines, -18 lines 0 comments Download
M sandbox/src/target_process.cc View 1 11 chunks +50 lines, -60 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
erikwright (departed)
Hi Carlos, The changes to sandbox/ got a bit more significant, so I broke them ...
8 years, 8 months ago (2012-03-30 16:29:31 UTC) #1
erikwright (departed)
http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc File sandbox/src/target_process.cc (right): http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc#newcode280 sandbox/src/target_process.cc:280: return ::GetLastError(); Theoretical leak of target_shared_section here.
8 years, 8 months ago (2012-03-30 16:30:34 UTC) #2
alexeypa (please no reviews)
A drive-by nit. http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc File sandbox/src/target_process.cc (right): http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc#newcode337 sandbox/src/target_process.cc:337: target->sandbox_process_info_.Receive()->hProcess = process; It is not ...
8 years, 8 months ago (2012-03-30 18:18:58 UTC) #3
erikwright (departed)
http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc File sandbox/src/target_process.cc (right): http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc#newcode337 sandbox/src/target_process.cc:337: target->sandbox_process_info_.Receive()->hProcess = process; On 2012/03/30 18:18:59, alexeypa wrote: > ...
8 years, 8 months ago (2012-03-30 18:36:52 UTC) #4
alexeypa (please no reviews)
FYI http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc File sandbox/src/target_process.cc (right): http://codereview.chromium.org/9959018/diff/2001/sandbox/src/target_process.cc#newcode337 sandbox/src/target_process.cc:337: target->sandbox_process_info_.Receive()->hProcess = process; On 2012/03/30 18:36:52, erikwright wrote: ...
8 years, 8 months ago (2012-03-30 18:42:10 UTC) #5
erikwright (departed)
Ping cpu@?
8 years, 8 months ago (2012-04-02 19:47:00 UTC) #6
cpu_(ooo_6.6-7.5)
http://codereview.chromium.org/9959018/diff/2001/sandbox/src/sandbox.h File sandbox/src/sandbox.h (right): http://codereview.chromium.org/9959018/diff/2001/sandbox/src/sandbox.h#newcode87 sandbox/src/sandbox.h:87: base::win::ScopedProcessInformation* target) = 0; I rather keep this interface, ...
8 years, 8 months ago (2012-04-02 21:11:50 UTC) #7
erikwright (departed)
Hi Carlos, I have reverted the changes in sandbox.h . I think this was the ...
8 years, 8 months ago (2012-04-03 14:03:27 UTC) #8
cpu_(ooo_6.6-7.5)
looking good, one more question. http://codereview.chromium.org/9959018/diff/5022/sandbox/src/broker_services.cc File sandbox/src/broker_services.cc (left): http://codereview.chromium.org/9959018/diff/5022/sandbox/src/broker_services.cc#oldcode305 sandbox/src/broker_services.cc:305: ::GetCurrentProcess(), &dup_process_handle, why remove ...
8 years, 8 months ago (2012-04-04 00:25:23 UTC) #9
cpu_(ooo_6.6-7.5)
also please load the sandbox.sln solution, switch to 64 bit target, build and run all ...
8 years, 8 months ago (2012-04-04 00:29:39 UTC) #10
erikwright (departed)
On 2012/04/04 00:25:23, cpu wrote: > looking good, one more question. > > http://codereview.chromium.org/9959018/diff/5022/sandbox/src/broker_services.cc > ...
8 years, 8 months ago (2012-04-04 02:30:40 UTC) #11
erikwright (departed)
On 2012/04/04 00:29:39, cpu wrote: > also please load the sandbox.sln solution, switch to 64 ...
8 years, 8 months ago (2012-04-04 02:31:44 UTC) #12
erikwright (departed)
On 2012/04/04 00:29:39, cpu wrote: > also please load the sandbox.sln solution, switch to 64 ...
8 years, 8 months ago (2012-04-04 15:10:40 UTC) #13
cpu_(ooo_6.6-7.5)
lgtm About the compilation failures, I think the dependencies are foobared again. So ignore that. ...
8 years, 8 months ago (2012-04-04 20:01:53 UTC) #14
rvargas (doing something else)
8 years, 8 months ago (2012-04-12 20:10:10 UTC) #15
On 2012/04/04 20:01:53, cpu wrote:
> lgtm
> 
> About the compilation failures, I think the dependencies are foobared again.
So
> ignore that. I haven't done it for a while so now that I try it is pretty
> broken.

Not exactly. GYP just doesn't support (yet!) building solutions as 32 or 64
bits. In order to build the 64 bit tests, you have to manually change the
dependencies of each executable from the 32 bit version of each library to the
64 bit version (base.lib to base_nacl_win64.lib) etc, and rebuild.

Note that ipc_unittest.cc is broken (from a long time ago) so it must be
excluded, and service_resolver_unittest.cc should be excluded (be design).

Please make sure there are no more regressions.

Powered by Google App Engine
This is Rietveld 408576698