Go to file
vogelheim@chromium.org 623f2371eb Prevent calls to ReturnValue::Set with pointer-valued types.
[2nd try, after the previous version broke the build]

Currently, this code will compile:
SomePointer* p = ...;
ReturnValue r = ...;
r.Set(p);

What happens is that ReturnValue::Set has no pointer-ish overloads, but
a bool one, and hence C++ will convert the pointer to a bool and use
the Set(bool) overload. In other words, the example above is equivalent
to: r.Set(p ? true : false); Which probably isn't what the author had
in mind. This change adds a Set(void*) overload whose body forces a
compile error, to prevent this from happening inadvertently. The only
use of this indeed turned out to be an error.

(Said error was fixed/removed in crrev.com/267393002.)

Why was crrev.com/240013004 reverted?
The orginal version compiled fine on gcc (+ MSVC), but not on clang.
There's no clang try-bots, but the ASAN-based buildbots used clang
and hence the build broke. I'm slightly unsure on why, but clang -
unlike those other compilers - eagerly compiled the non-compilable
setter, which predictably broke. Now, the non-compilable setter uses
the same template logic that all other, comparable cases use. I've
tried 'make qc' with both gcc and clang versions.

BUG=
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/279883002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 15:36:51 +00:00
benchmarks Fix bug in nextWeaker function of deltablue benchmark. 2013-10-25 13:21:46 +00:00
build Always include debugger support. 2014-04-25 11:00:37 +00:00
include Prevent calls to ReturnValue::Set with pointer-valued types. 2014-05-09 15:36:51 +00:00
samples Unbreak samples and tools. 2014-05-08 06:52:35 +00:00
src [Sheriff] This reverts commits r21225 and r21226 for breaking Linux64 build. 2014-05-09 14:28:59 +00:00
test Shorten autogenerated error message for functions only. 2014-05-09 13:14:09 +00:00
tools Presubmit checks recover: 2014-05-09 12:59:24 +00:00
.clang-format Change clang-format config to allow for two empty lines between functions 2013-12-03 10:39:21 +00:00
.DEPS.git Introduce .DEPS.git file to support full git checkouts 2014-04-23 12:28:43 +00:00
.gitignore Update .gitignore wrt promise test files. 2014-04-24 14:15:06 +00:00
AUTHORS Add ARM contributors to AUTHORS. 2014-02-12 11:54:34 +00:00
BUILD.gn Merge counters and v8-counters 2014-05-07 07:15:24 +00:00
ChangeLog Sync change log and version file with trunk. 2014-05-09 11:17:45 +00:00
codereview.settings Add settings for try server. 2013-12-17 12:24:25 +00:00
DEPS Introduce .DEPS.git file to support full git checkouts 2014-04-23 12:28:43 +00:00
LICENSE Update LICENSE date. 2014-02-18 10:50:22 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Always include debugger support. 2014-04-25 11:00:37 +00:00
Makefile.android [Android]: Update Makefile.android to use platform-14 as minimum. 2014-05-06 09:08:32 +00:00
Makefile.nacl This should make the NaCl build jobs green again. 2014-04-17 14:22:20 +00:00
OWNERS Add rmcilroy@chromium.org to src/OWNERS. 2014-04-11 08:55:18 +00:00
PRESUBMIT.py Update tryserver configuration with new linux and arm bots. 2014-04-01 13:43:32 +00:00
WATCHLISTS Add myself to a watchlist for the public API. 2013-10-10 11:37:48 +00:00