| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 return 40; | 77 return 40; |
| 78 }, | 78 }, |
| 79 set: function(val) { | 79 set: function(val) { |
| 80 try { | 80 try { |
| 81 y.x = 40; | 81 y.x = 40; |
| 82 } catch(e) { | 82 } catch(e) { |
| 83 assertEquals(3, e.stack.split('\n').length); | 83 assertEquals(3, e.stack.split('\n').length); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 } | 86 }; |
| 87 | 87 |
| 88 Object.defineProperty(x, 'c', descriptor) | 88 Object.defineProperty(x, 'c', descriptor); |
| 89 | 89 |
| 90 // Check that the stack for an exception in a getter and setter produce the | 90 // Check that the stack for an exception in a getter and setter produce the |
| 91 // expected stack height. | 91 // expected stack height. |
| 92 x.a; | 92 x.a; |
| 93 x.b; | 93 x.b; |
| 94 x.c; | 94 x.c; |
| 95 x.a = 1; | 95 x.a = 1; |
| 96 x.b = 1; | 96 x.b = 1; |
| 97 x.c = 1; | 97 x.c = 1; |
| 98 | 98 |
| 99 // Do the same with the getters/setters on the a prototype object. | 99 // Do the same with the getters/setters on the a prototype object. |
| 100 xx = {} | 100 xx = {}; |
| 101 xx.__proto__ = x | 101 xx.__proto__ = x; |
| 102 | 102 |
| 103 xx.a; | 103 xx.a; |
| 104 xx.b; | 104 xx.b; |
| 105 xx.c; | 105 xx.c; |
| 106 xx.a = 1; | 106 xx.a = 1; |
| 107 xx.b = 1; | 107 xx.b = 1; |
| 108 xx.c = 1; | 108 xx.c = 1; |
| OLD | NEW |