Skip to content
Browse files
deps: backport 75e43a6 from v8 upstream
Note: chunk in discarded as related code missing
from current version in node.

Original commit message:

  Use static_cast<> for NULL (clang 3.7)

  The following errors come up when compiling v8
   with clang 3.7 on FreeBSD/amd64:

  src/runtime/ error: reinterpret_cast from
  'nullptr_t' to 'v8::internal::Smi *' is not allowed
    local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));

  test/cctest/ error: reinterpret_cast from
        'nullptr_t' to 'v8::internal::Object *' is not allowed
    Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
  test/cctest/ error: reinterpret_cast from
        'nullptr_t' to 'Address' (aka 'unsigned char *') is not
    Address base = reinterpret_cast<Address>(NULL);

  +add myself to the AUTHORS file.


  Review URL:

  Cr-Commit-Position: refs/heads/master@{#30103}

PR-URL: #2636
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <>
Reviewed-By: bnoordhuis - Ben Noordhuis <>
  • Loading branch information
saper authored and Fishrock123 committed Sep 3, 2015
1 parent 8a9a3bf commit 714e96e8b946a0386b3971bf6a7d73e0a839d823
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
@@ -69,6 +69,7 @@ Kang-Hao (Kenny) Lu <>
Luis Reis <>
Luke Zarko <>
Maciej Małecki <>
Marcin Cieślak <>
Mathias Bynens <>
Matt Hanselman <>
Matthew Sporleder <>
@@ -627,7 +627,7 @@ RUNTIME_FUNCTION(Runtime_CreateBreakIterator) {

local_object->SetInternalField(0, reinterpret_cast<Smi*>(break_iterator));
// Make sure that the pointer to adopted text is NULL.
local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL));
local_object->SetInternalField(1, static_cast<Smi*>(nullptr));

Factory* factory = isolate->factory();
Handle<String> key = factory->NewStringFromStaticChars("breakIterator");
@@ -126,7 +126,7 @@ TEST(HandleNull) {
Isolate* isolate = CcTest::i_isolate();
HandleScope outer_scope(isolate);
LocalContext context;
Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
Handle<Object> n(static_cast<Object*>(nullptr), isolate);

0 comments on commit 714e96e

Please sign in to comment.