Revision: 15705
Author:
ul...@chromium.org
Date: Wed Jul 17 01:46:44 2013
Log: Do not call reinterpret_cast when converting from NULL.
If NULL is a nullptr (such as on my FreeBSD system), it is not possible to
use reinterpret_cast to convert it to another pointer. Plus, just using NULL
directly achieves the same effect.
R=
ul...@chromium.org
Review URL:
https://chromiumcodereview.appspot.com/19388005
Patch from Raphael Kubo da Costa <
raphael.ku...@intel.com>.
http://code.google.com/p/v8/source/detail?r=15705
Modified:
/branches/bleeding_edge/src/heap.cc
/branches/bleeding_edge/src/stub-cache.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Jul 15 08:12:16 2013
+++ /branches/bleeding_edge/src/heap.cc Wed Jul 17 01:46:44 2013
@@ -7350,7 +7350,7 @@
#ifdef DEBUG
-Object* const PathTracer::kAnyGlobalObject =
reinterpret_cast<Object*>(NULL);
+Object* const PathTracer::kAnyGlobalObject = NULL;
class PathTracer::MarkVisitor: public ObjectVisitor {
public:
=======================================
--- /branches/bleeding_edge/src/stub-cache.cc Mon Jul 15 08:23:52 2013
+++ /branches/bleeding_edge/src/stub-cache.cc Wed Jul 17 01:46:44 2013
@@ -1539,7 +1539,7 @@
Handle<Name> name) {
return (FLAG_print_code_stubs && !name.is_null() && name->IsString())
? GetCodeWithFlags(flags, *Handle<String>::cast(name)->ToCString())
- : GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL));
+ : GetCodeWithFlags(flags, NULL);
}