Commit e0bbcf1e authored by ricow@chromium.org's avatar ricow@chromium.org

Fix bug in mjsunit/const-eval-init causing objects to be initialized to undefined.

In mjsunit/const-eval-init - testInitSlowCaseExtension a range of objects are initialized to undefined instead of a value because the variable i is within quotes (i.e., the source becommes "a1 = i" instead of "a1 = 1".

This should have no impact on the test, I just stumbled over this on
an unrelated matter.

Review URL: http://codereview.chromium.org/2758002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c7ab2b6a
......@@ -91,7 +91,7 @@ function testInitSlowCaseExtension() {
var source = "";
// Introduce 100 properties on the context extension object to force
// it in slow case.
for (var i = 0; i < 100; i++) source += ("var a" + i + " = i;");
for (var i = 0; i < 100; i++) source += ("var a" + i + " = " + i + ";");
source += "const x = 10; assertEquals(10, x); x = 11; assertEquals(10, x)";
eval(source);
}
......
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