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

Issue 17959002: Disallow C++11 compilers from constructing OwnPtrs from 0 (Closed)

Created:
7 years, 6 months ago by adamk
Modified:
7 years, 5 months ago
Reviewers:
jamesr
CC:
blink-reviews, loislo+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, abarth-chromium, dglazkov+blink, adamk+blink_chromium.org, jeez, jyasskin (not chrome)
Visibility:
Public.

Description

Disallow C++11 compilers from constructing OwnPtrs from 0 C++11 allows 0 to be implicit converted to std::nullptr_t, but Blink's shim for std::nullptr_t does not have such support. To avoid inconsistency between native and shimmed versions, delete the int constructor, which makes conversions from 0 fail properly in C++11 mode. R=jamesr BUG=254668 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=153846

Patch Set 1 #

Patch Set 2 : Delete the int constructor #

Patch Set 3 : Add a macro to disallow construction from zero #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M Source/wtf/NullPtr.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M Source/wtf/OwnPtr.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/wtf/PassOwnArrayPtr.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/wtf/PassOwnPtr.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
adamk
7 years, 6 months ago (2013-06-26 22:46:35 UTC) #1
jamesr
Hmm, while I like consistency I think implicitly converting '0' is not really a great ...
7 years, 6 months ago (2013-06-26 23:13:24 UTC) #2
adamk
On 2013/06/26 23:13:24, jamesr wrote: > Hmm, while I like consistency I think implicitly converting ...
7 years, 6 months ago (2013-06-26 23:32:13 UTC) #3
jamesr
On 2013/06/26 23:32:13, adamk wrote: > On 2013/06/26 23:13:24, jamesr wrote: > > Hmm, while ...
7 years, 6 months ago (2013-06-26 23:34:42 UTC) #4
adamk
I've updated the patch to delete the int constructor, as requested. I feel a little ...
7 years, 5 months ago (2013-07-09 21:34:28 UTC) #5
jamesr
I think this is great. Which toolchains have you tested this with?
7 years, 5 months ago (2013-07-09 21:49:33 UTC) #6
adamk
On 2013/07/09 21:49:33, jamesr wrote: > I think this is great. Which toolchains have you ...
7 years, 5 months ago (2013-07-09 21:55:44 UTC) #7
jyasskin (not chrome)
On Tue, Jul 9, 2013 at 2:55 PM, <adamk@chromium.org> wrote: > The toolchain that'd be ...
7 years, 5 months ago (2013-07-09 21:58:11 UTC) #8
adamk
Per jyasskin, updated to delete the constructor via a macro. This still results in a ...
7 years, 5 months ago (2013-07-09 22:09:01 UTC) #9
jamesr
lgtm. watch the trybots and bots with care
7 years, 5 months ago (2013-07-09 22:16:29 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/17959002/11001
7 years, 5 months ago (2013-07-09 22:45:47 UTC) #11
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 5 months ago (2013-07-10 00:45:34 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/17959002/11001
7 years, 5 months ago (2013-07-10 01:03:23 UTC) #13
commit-bot: I haz the power
7 years, 5 months ago (2013-07-10 04:23:19 UTC) #14
Message was sent while issue was closed.
Change committed as 153846

Powered by Google App Engine
This is Rietveld 408576698