v8/include
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
..
v8-debug.h Clean up Debugger::NotifyMessageHandler. 2014-05-09 09:24:32 +00:00
v8-platform.h Bulk update of Google copyright headers in source files. 2014-04-29 06:42:26 +00:00
v8-profiler.h Presubmit checks recover: 2014-05-09 12:59:24 +00:00
v8-testing.h Bulk update of Google copyright headers in source files. 2014-04-29 06:42:26 +00:00
v8-util.h Presubmit checks recover: 2014-05-09 12:59:24 +00:00
v8.h Prevent calls to ReturnValue::Set with pointer-valued types. 2014-05-09 15:36:51 +00:00
v8config.h Bulk update of Google copyright headers in source files. 2014-04-29 06:42:26 +00:00
v8stdint.h Bulk update of Google copyright headers in source files. 2014-04-29 06:42:26 +00:00