Commit ec0b0015 authored by rossberg@chromium.org's avatar rossberg@chromium.org

Work around nifty VS10 compiler bug

VS10 generates bogus code for specific arguments to the Number::New function when invoked in specific places of an ExpectRecords array definition, passing a garbage value to the function (as printf debugging reveals). Changing the argument from 1 to 7 apparently circumvents the problem.

R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12212108

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 89474cde
......@@ -325,7 +325,7 @@ TEST(APITestBasicMutation) {
"function observer(r) { [].push.apply(records, r); };"
"Object.observe(obj, observer);"
"obj"));
obj->Set(String::New("foo"), Number::New(1));
obj->Set(String::New("foo"), Number::New(7));
obj->Set(1, Number::New(2));
// ForceSet should work just as well as Set
obj->ForceSet(String::New("foo"), Number::New(3));
......@@ -345,7 +345,9 @@ TEST(APITestBasicMutation) {
const RecordExpectation expected_records[] = {
{ obj, "new", "foo", Handle<Value>() },
{ obj, "new", "1", Handle<Value>() },
{ obj, "updated", "foo", Number::New(1) },
// Note: use 7 not 1 below, as the latter triggers a nifty VS10 compiler bug
// where instead of 1.0, a garbage value would be passed into Number::New.
{ obj, "updated", "foo", Number::New(7) },
{ obj, "updated", "1", Number::New(2) },
{ obj, "updated", "1", Number::New(4) },
{ obj, "new", "1.1", Handle<Value>() },
......
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