Skip to content

Commit 4593539

Browse files
saperFishrock123
saper
authored andcommitted
deps: backport 75e43a6 from v8 upstream
Note: chunk in test-heap.cc:1989 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/runtime-i18n.cc:629:37: error: reinterpret_cast from 'nullptr_t' to 'v8::internal::Smi *' is not allowed local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/cctest/test-heap.cc:131:20: error: reinterpret_cast from 'nullptr_t' to 'v8::internal::Object *' is not allowed Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/cctest/test-heap.cc:1989:18: error: reinterpret_cast from 'nullptr_t' to 'Address' (aka 'unsigned char *') is not allowed Address base = reinterpret_cast<Address>(NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +add myself to the AUTHORS file. BUG= Review URL: https://codereview.chromium.org/1277353002 Cr-Commit-Position: refs/heads/master@{#30103} PR-URL: #2636 Reviewed-By: thefourtheye - Sakthipriyan Vairamani <[email protected]> Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
1 parent 74ff9bc commit 4593539

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

deps/v8/AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Kang-Hao (Kenny) Lu <[email protected]>
6969
Luis Reis <[email protected]>
7070
Luke Zarko <[email protected]>
7171
Maciej Małecki <[email protected]>
72+
Marcin Cieślak <[email protected]>
7273
Mathias Bynens <[email protected]>
7374
Matt Hanselman <[email protected]>
7475
Matthew Sporleder <[email protected]>

deps/v8/src/runtime/runtime-i18n.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ RUNTIME_FUNCTION(Runtime_CreateBreakIterator) {
627627

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

632632
Factory* factory = isolate->factory();
633633
Handle<String> key = factory->NewStringFromStaticChars("breakIterator");

deps/v8/test/cctest/test-heap.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ TEST(HandleNull) {
126126
Isolate* isolate = CcTest::i_isolate();
127127
HandleScope outer_scope(isolate);
128128
LocalContext context;
129-
Handle<Object> n(reinterpret_cast<Object*>(NULL), isolate);
129+
Handle<Object> n(static_cast<Object*>(nullptr), isolate);
130130
CHECK(!n.is_null());
131131
}
132132

0 commit comments

Comments
 (0)