Reviewers: Jakob,

Description:
Fix NewStringRangeError failure due to failing malloc.

[email protected]

Please review this at https://codereview.chromium.org/912333002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+1, -0 lines):
  M test/cctest/test-api.cc


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;


--
--
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.

Reply via email to