| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 { ExistsInPrototypeContext context; | 527 { ExistsInPrototypeContext context; |
| 528 context.Check("this.x = 87; this.x", | 528 context.Check("this.x = 87; this.x", |
| 529 0, | 529 0, |
| 530 0, | 530 0, |
| 531 0, | 531 0, |
| 532 EXPECT_RESULT, Number::New(87)); | 532 EXPECT_RESULT, Number::New(87)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 { ExistsInPrototypeContext context; | 535 { ExistsInPrototypeContext context; |
| 536 context.Check("var x; x", | 536 context.Check("var x; x", |
| 537 0, | 537 1, // get |
| 538 0, | 538 0, |
| 539 1, // declaration | 539 1, // declaration |
| 540 EXPECT_RESULT, Undefined()); | 540 EXPECT_EXCEPTION); |
| 541 } | 541 } |
| 542 | 542 |
| 543 { ExistsInPrototypeContext context; | 543 { ExistsInPrototypeContext context; |
| 544 context.Check("var x = 0; x", | 544 context.Check("var x = 0; x", |
| 545 0, | 545 0, |
| 546 0, | 546 0, |
| 547 1, // declaration | 547 1, // declaration |
| 548 EXPECT_RESULT, Number::New(0)); | 548 EXPECT_RESULT, Number::New(0)); |
| 549 } | 549 } |
| 550 | 550 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 HandleScope scope; | 585 HandleScope scope; |
| 586 | 586 |
| 587 { AbsentInPrototypeContext context; | 587 { AbsentInPrototypeContext context; |
| 588 context.Check("if (false) { var x = 0; }; x", | 588 context.Check("if (false) { var x = 0; }; x", |
| 589 0, | 589 0, |
| 590 0, | 590 0, |
| 591 1, // declaration | 591 1, // declaration |
| 592 EXPECT_RESULT, Undefined()); | 592 EXPECT_RESULT, Undefined()); |
| 593 } | 593 } |
| 594 } | 594 } |
| OLD | NEW |