Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index f1593fe4efa5dbf1cab2cd68dbd963c13d5779de..5b11386d47c72f0bae3d5857b1e1996a139ace95 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -21923,6 +21923,7 @@ TEST(NewStringRangeError) { |
const int length = i::String::kMaxLength + 1; |
const int buffer_size = length * sizeof(uint16_t); |
void* buffer = malloc(buffer_size); |
+ if (buffer == NULL) return; |
memset(buffer, 'A', buffer_size); |
{ |
v8::TryCatch try_catch; |