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

Issue 2870017: Fix compiler error in sandbox util in case exception is enabled.... (Closed)

Created:
10 years, 6 months ago by Victor Wang
Modified:
9 years, 7 months ago
CC:
chromium-reviews, M-A Ruel, darin (slow to review)
Visibility:
Public.

Description

Fix compiler error in sandbox util in case exception is enabled. Add operator delete that matches the placement form of the operator new. This is required by compiler to generate code to call operator delete in case the object's constructor throws an exception. See http://msdn.microsoft.com/en-us/library/cxdxz3x6.aspx R=rvargas BUG=none TEST=sandbox code compiles if exception is enabled. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50486

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M sandbox/src/sandbox_nt_util.h View 1 chunk +6 lines, -0 lines 0 comments Download
M sandbox/src/sandbox_nt_util.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Victor Wang
10 years, 6 months ago (2010-06-22 01:52:28 UTC) #1
rvargas (doing something else)
http://codereview.chromium.org/2870017/diff/1/2 File sandbox/src/sandbox_nt_util.cc (right): http://codereview.chromium.org/2870017/diff/1/2#newcode564 sandbox/src/sandbox_nt_util.cc:564: void* near_to) { nit: add UNREFERENCED_PARAMETER(near_to) http://codereview.chromium.org/2870017/diff/1/3 File sandbox/src/sandbox_nt_util.h ...
10 years, 6 months ago (2010-06-22 02:11:00 UTC) #2
Victor Wang
http://codereview.chromium.org/2870017/diff/1/2 File sandbox/src/sandbox_nt_util.cc (right): http://codereview.chromium.org/2870017/diff/1/2#newcode564 sandbox/src/sandbox_nt_util.cc:564: void* near_to) { On 2010/06/22 02:11:00, rvargas wrote: > ...
10 years, 6 months ago (2010-06-22 02:51:08 UTC) #3
rvargas (doing something else)
10 years, 6 months ago (2010-06-22 17:54:20 UTC) #4
On 2010/06/22 02:51:08, Victor Wang wrote:
> http://codereview.chromium.org/2870017/diff/1/2
> File sandbox/src/sandbox_nt_util.cc (right):
> 
> http://codereview.chromium.org/2870017/diff/1/2#newcode564
> sandbox/src/sandbox_nt_util.cc:564: void* near_to) {
> On 2010/06/22 02:11:00, rvargas wrote:
> > nit: add UNREFERENCED_PARAMETER(near_to)
> 
> Done.
> 
> http://codereview.chromium.org/2870017/diff/1/3
> File sandbox/src/sandbox_nt_util.h (right):
> 
> http://codereview.chromium.org/2870017/diff/1/3#newcode20
> sandbox/src/sandbox_nt_util.h:20: void __cdecl operator delete(void* memory,
> sandbox::AllocationType type,
> On 2010/06/22 02:11:00, rvargas wrote:
> > Given that we are already providing an operator delete for that same
purpose,
> > I'd say just add the extra argument to the previous one (with the same
default
> > as the operator new)... delete should have been updated when we updated new
to
> > have an extra argument.
> I don't think operator delete could have default parameters, see
> http://msdn.microsoft.com/en-us/library/wdy2f5hx.aspx.

Ouch... OK. LGTM then.

Powered by Google App Engine
This is Rietveld 408576698