Reviewers: dcarney,
Message:
Created Revert of Prevent calls to ReturnValue::Set with pointer-valued
types.
Description:
Revert of Prevent calls to ReturnValue::Set with pointer-valued types.
(https://codereview.chromium.org/240013004/)
Reason for revert:
Looks like this broke the "V8 Linux64 ASAN" build.
Original issue's description:
Prevent calls to ReturnValue::Set with pointer-valued types.
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.)
BUG=
[email protected]
Committed: https://code.google.com/p/v8/source/detail?r=21217
Please review this at https://codereview.chromium.org/271113002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+0, -9 lines):
M include/v8.h
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.