Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: test/cctest/test-api.cc

Issue 912333002: Fix NewStringRangeError failure due to failing malloc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698