diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-03-18 13:16:26 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-03-20 15:55:39 +0100 |
commit | 3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch) | |
tree | 92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/base/process/memory_unittest.cc | |
parent | e90d7c4b152c56919d963987e2503f9909a666d2 (diff) |
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies
needed on Windows.
Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42
Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/base/process/memory_unittest.cc')
-rw-r--r-- | chromium/base/process/memory_unittest.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/chromium/base/process/memory_unittest.cc b/chromium/base/process/memory_unittest.cc index a1f30526aa3..e5c759d5711 100644 --- a/chromium/base/process/memory_unittest.cc +++ b/chromium/base/process/memory_unittest.cc @@ -10,6 +10,7 @@ #include "base/compiler_specific.h" #include "base/debug/alias.h" +#include "base/strings/stringprintf.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_WIN) @@ -23,7 +24,6 @@ #include "base/process/memory_unittest_mac.h" #endif #if defined(OS_LINUX) -#include <glib.h> #include <malloc.h> #endif @@ -260,14 +260,13 @@ TEST_F(OutOfMemoryDeathTest, Memalign) { } TEST_F(OutOfMemoryDeathTest, ViaSharedLibraries) { - // g_try_malloc is documented to return NULL on failure. (g_malloc is the - // 'safe' default that crashes if allocation fails). However, since we have - // hopefully overridden malloc, even g_try_malloc should fail. This tests - // that the run-time symbol resolution is overriding malloc for shared - // libraries as well as for our code. + // This tests that the run-time symbol resolution is overriding malloc for + // shared libraries (including libc itself) as well as for our code. + std::string format = base::StringPrintf("%%%zud", test_size_); + char *value = NULL; ASSERT_DEATH({ SetUpInDeathAssert(); - value_ = g_try_malloc(test_size_); + EXPECT_EQ(-1, asprintf(&value, format.c_str(), 0)); }, ""); } #endif // OS_LINUX |