Commit de06f309 authored by feng@chromium.org's avatar feng@chromium.org

Avoid using sprintf_s, which is windows-only.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b7c12004
......@@ -5474,10 +5474,18 @@ THREADED_TEST(AccessChecksReenabledCorrectly) {
templ->Set(v8_str("a"), v8_str("a"));
// Add more than 8 (see kMaxFastProperties) properties
// so that the constructor will force copying map.
// Cannot sprintf, gcc complains unsafety.
char buf[5];
for (int i = 0; i < 999; i++) {
sprintf_s(buf, 5, "x%3d", i);
templ->Set(v8_str(buf), v8::Number::New(i));
for (char i = '0'; i <= '9' ; i++) {
buf[1] = i;
for (char j = '0'; j <= '9'; j++) {
buf[2] = j;
for (char k = '0'; k <= '9'; k++) {
buf[3] = k;
buf[4] = 0;
templ->Set(v8_str(buf), v8::Number::New(k));
}
}
}
Local<v8::Object> instance_1 = templ->NewInstance();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment