Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 60e70fc0f617b5fa1c7b5843d1de2e90345c7300..2ea380e1c94c40f4ad64eff9ce3dc6bcc9c936e2 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -3700,13 +3700,13 @@ TEST(ObjectsInOptimizedCodeAreWeak) { |
static Handle<JSFunction> OptimizeDummyFunction(const char* name) { |
- char source[256]; |
- snprintf(source, sizeof(source), |
- "function %s() { return 0; }" |
- "%s(); %s();" |
- "%%OptimizeFunctionOnNextCall(%s);" |
- "%s();", name, name, name, name, name); |
- CompileRun(source); |
+ EmbeddedVector<char, 256> source; |
+ OS::SNPrintF(source, |
+ "function %s() { return 0; }" |
+ "%s(); %s();" |
+ "%%OptimizeFunctionOnNextCall(%s);" |
+ "%s();", name, name, name, name, name); |
+ CompileRun(source.start()); |
Handle<JSFunction> fun = |
v8::Utils::OpenHandle( |
*v8::Handle<v8::Function>::Cast( |